<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js">/*
Copyright(c) 2011 Sencha Inc.
licensing@sencha.com
*/
Ext.define(&quot;Ext.util.Observable&quot;,{requires:[&quot;Ext.util.Event&quot;],statics:{releaseCapture:function(a){a.fireEvent=this.prototype.fireEvent},capture:function(c,b,a){c.fireEvent=Ext.Function.createInterceptor(c.fireEvent,b,a)},observe:function(a,b){if(a){if(!a.isObservable){Ext.applyIf(a,new this());this.capture(a.prototype,a.fireEvent,a)}if(Ext.isObject(b)){a.on(b)}return a}}},isObservable:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.listeners){b.on(b.listeners);delete b.listeners}b.events=b.events||{};if(b.bubbleEvents){b.enableBubble(b.bubbleEvents)}},eventOptionsRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,addManagedListener:function(h,d,f,e,c){var g=this,a=g.managedListeners=g.managedListeners||[],b;if(typeof d!==&quot;string&quot;){c=d;for(d in c){if(c.hasOwnProperty(d)){b=c[d];if(!g.eventOptionsRe.test(d)){g.addManagedListener(h,d,b.fn||b,b.scope||c.scope,b.fn?b:c)}}}}else{a.push({item:h,ename:d,fn:f,scope:e,options:c});h.on(d,f,e,c)}},removeManagedListener:function(h,c,f,j){var e=this,k,b,g,a,d;if(typeof c!==&quot;string&quot;){k=c;for(c in k){if(k.hasOwnProperty(c)){b=k[c];if(!e.eventOptionsRe.test(c)){e.removeManagedListener(h,c,b.fn||b,b.scope||k.scope)}}}}g=e.managedListeners?e.managedListeners.slice():[];for(d=0,a=g.length;d&lt;a;d++){e.removeManagedListenerItem(false,g[d],h,c,f,j)}},fireEvent:function(b){var c=b.toLowerCase(),d=this.events,e=d&amp;&amp;d[c],a=e&amp;&amp;e.bubble;return this.continueFireEvent(c,Ext.Array.slice(arguments,1),a)},continueFireEvent:function(c,e,b){var g=this,a,f,d=true;do{if(g.eventsSuspended===true){if((a=g.eventQueue)){a.push([c,e,b])}return d}else{f=g.events[c];if(f&amp;&amp;f!=true){if((d=f.fire.apply(f,e))===false){break}}}}while(b&amp;&amp;(g=g.getBubbleParent()));return d},getBubbleParent:function(){var b=this,a=b.getBubbleTarget&amp;&amp;b.getBubbleTarget();if(a&amp;&amp;a.isObservable){return a}return null},addListener:function(c,e,d,b){var g=this,a,f;if(typeof c!==&quot;string&quot;){b=c;for(c in b){if(b.hasOwnProperty(c)){a=b[c];if(!g.eventOptionsRe.test(c)){g.addListener(c,a.fn||a,a.scope||b.scope,a.fn?a:b)}}}}else{c=c.toLowerCase();g.events[c]=g.events[c]||true;f=g.events[c]||true;if(Ext.isBoolean(f)){g.events[c]=f=new Ext.util.Event(g,c)}f.addListener(e,d,Ext.isObject(b)?b:{})}},removeListener:function(c,e,d){var g=this,b,f,a;if(typeof c!==&quot;string&quot;){a=c;for(c in a){if(a.hasOwnProperty(c)){b=a[c];if(!g.eventOptionsRe.test(c)){g.removeListener(c,b.fn||b,b.scope||a.scope)}}}}else{c=c.toLowerCase();f=g.events[c];if(f&amp;&amp;f.isEvent){f.removeListener(e,d)}}},clearListeners:function(){var b=this.events,c,a;for(a in b){if(b.hasOwnProperty(a)){c=b[a];if(c.isEvent){c.clearListeners()}}}this.clearManagedListeners()},clearManagedListeners:function(){var b=this.managedListeners||[],c=0,a=b.length;for(;c&lt;a;c++){this.removeManagedListenerItem(true,b[c])}this.managedListeners=[]},removeManagedListenerItem:function(b,a,f,c,e,d){if(b||(a.item===f&amp;&amp;a.ename===c&amp;&amp;(!e||a.fn===e)&amp;&amp;(!d||a.scope===d))){a.item.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(this.managedListeners,a)}}},addEvents:function(e){var d=this,b,a,c;d.events=d.events||{};if(Ext.isString(e)){b=arguments;c=b.length;while(c--){d.events[b[c]]=d.events[b[c]]||true}}else{Ext.applyIf(d.events,e)}},hasListener:function(a){var b=this.events[a.toLowerCase()];return b&amp;&amp;b.isEvent===true&amp;&amp;b.listeners.length&gt;0},suspendEvents:function(a){this.eventsSuspended=true;if(a&amp;&amp;!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var a=this,b=a.eventQueue;a.eventsSuspended=false;delete a.eventQueue;if(b){Ext.each(b,function(c){a.continueFireEvent.apply(a,c)})}},relayEvents:function(c,e,h){h=h||&quot;&quot;;var g=this,a=e.length,d=0,f,b;for(;d&lt;a;d++){f=e[d].substr(h.length);b=h+f;g.events[b]=g.events[b]||true;c.on(f,g.createRelayer(b))}},createRelayer:function(a){var b=this;return function(){return b.fireEvent.apply(b,[a].concat(Array.prototype.slice.call(arguments,0,-1)))}},enableBubble:function(a){var b=this;if(!Ext.isEmpty(a)){a=Ext.isArray(a)?a:Ext.Array.toArray(arguments);Ext.each(a,function(c){c=c.toLowerCase();var d=b.events[c]||true;if(Ext.isBoolean(d)){d=new Ext.util.Event(b,c);b.events[c]=d}d.bubble=true})}}},function(){this.createAlias({on:&quot;addListener&quot;,un:&quot;removeListener&quot;,mon:&quot;addManagedListener&quot;,mun:&quot;removeManagedListener&quot;});this.observeClass=this.observe;Ext.apply(Ext.util.Observable.prototype,function(){function a(i){var h=(this.methodEvents=this.methodEvents||{})[i],d,c,f,g=this;if(!h){this.methodEvents[i]=h={};h.originalFn=this[i];h.methodName=i;h.before=[];h.after=[];var b=function(k,j,e){if((c=k.apply(j||g,e))!==undefined){if(typeof c==&quot;object&quot;){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}f=!!c.cancel}else{if(c===false){f=true}else{d=c}}}};this[i]=function(){var k=Array.prototype.slice.call(arguments,0),j,l,e;d=c=undefined;f=false;for(l=0,e=h.before.length;l&lt;e;l++){j=h.before[l];b(j.fn,j.scope,k);if(f){return d}}if((c=h.originalFn.apply(g,k))!==undefined){d=c}for(l=0,e=h.after.length;l&lt;e;l++){j=h.after[l];b(j.fn,j.scope,k);if(f){return d}}return d}}return h}return{beforeMethod:function(d,c,b){a.call(this,d).before.push({fn:c,scope:b})},afterMethod:function(d,c,b){a.call(this,d).after.push({fn:c,scope:b})},removeMethodListener:function(h,f,d){var g=this.getMethodEvent(h),c,b;for(c=0,b=g.before.length;c&lt;b;c++){if(g.before[c].fn==f&amp;&amp;g.before[c].scope==d){Ext.Array.erase(g.before,c,1);return}}for(c=0,b=g.after.length;c&lt;b;c++){if(g.after[c].fn==f&amp;&amp;g.after[c].scope==d){Ext.Array.erase(g.after,c,1);return}}},toggleEventLogging:function(b){Ext.util.Observable[b?&quot;capture&quot;:&quot;releaseCapture&quot;](this,function(c){if(Ext.isDefined(Ext.global.console)){Ext.global.console.log(c,arguments)}})}}}())});Ext.define(&quot;Ext.data.Association&quot;,{primaryKey:&quot;id&quot;,defaultReaderType:&quot;json&quot;,statics:{create:function(a){if(!a.isAssociation){if(Ext.isString(a)){a={type:a}}switch(a.type){case&quot;belongsTo&quot;:return Ext.create(&quot;Ext.data.BelongsToAssociation&quot;,a);case&quot;hasMany&quot;:return Ext.create(&quot;Ext.data.HasManyAssociation&quot;,a);default:}}return a}},constructor:function(b){Ext.apply(this,b);var c=Ext.ModelManager.types,d=b.ownerModel,f=b.associatedModel,e=c[d],g=c[f],a;this.ownerModel=e;this.associatedModel=g;Ext.applyIf(this,{ownerName:d,associatedName:f})},getReader:function(){var c=this,a=c.reader,b=c.associatedModel;if(a){if(Ext.isString(a)){a={type:a}}if(a.isReader){a.setModel(b)}else{Ext.applyIf(a,{model:b,type:c.defaultReaderType})}c.reader=Ext.createByAlias(&quot;reader.&quot;+a.type,a)}return c.reader||null}});Ext.define(&quot;Ext.data.IdGenerator&quot;,{isGenerator:true,constructor:function(a){var b=this;Ext.apply(b,a);if(b.id){Ext.data.IdGenerator.all[b.id]=b}},getRecId:function(a){return a.modelName+&quot;-&quot;+a.internalId},statics:{all:{},get:function(a){var c,d,b;if(typeof a==&quot;string&quot;){d=b=a;a=null}else{if(a.isGenerator){return a}else{d=a.id||a.type;b=a.type}}c=this.all[d];if(!c){c=Ext.create(&quot;idgen.&quot;+b,a)}return c}}});Ext.define(&quot;Ext.data.Operation&quot;,{synchronous:true,action:undefined,filters:undefined,sorters:undefined,group:undefined,start:undefined,limit:undefined,batch:undefined,callback:undefined,scope:undefined,started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,actionCommitRecordsRe:/^(?:create|update)$/i,actionSkipSyncRe:/^destroy$/i,constructor:function(a){Ext.apply(this,a||{})},commitRecords:function(b){var f=this,g,c,d,e,a;if(!f.actionSkipSyncRe.test(f.action)){d=f.records;if(d&amp;&amp;d.length){g=Ext.create(&quot;Ext.util.MixedCollection&quot;,true,function(h){return h.getId()});g.addAll(d);for(c=b?b.length:0;c--;){e=b[c];a=g.get(e.getId());if(a){a.beginEdit();a.set(e.data);a.endEdit(true)}}if(f.actionCommitRecordsRe.test(f.action)){for(c=d.length;c--;){d[c].commit()}}}}},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},getRecords:function(){var a=this.getResultSet();return(a===undefined?this.records:a.records)},getResultSet:function(){return this.resultSet},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&amp;&amp;this.success===true},setBatch:function(a){this.batch=a},allowWrite:function(){return this.action!=&quot;read&quot;}});Ext.define(&quot;Ext.data.validations&quot;,{singleton:true,presenceMessage:&quot;must be present&quot;,lengthMessage:&quot;is the wrong length&quot;,formatMessage:&quot;is the wrong format&quot;,inclusionMessage:&quot;is not included in the list of acceptable values&quot;,exclusionMessage:&quot;is not an acceptable value&quot;,emailMessage:&quot;is not a valid email address&quot;,emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,presence:function(a,b){if(b===undefined){b=a}return !!b||b===0},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&amp;&amp;d&lt;c)||(a&amp;&amp;d&gt;a)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&amp;&amp;a.matcher.test(b))},inclusion:function(a,b){return a.list&amp;&amp;Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&amp;&amp;Ext.Array.indexOf(a.list,b)==-1}});Ext.define(&quot;Ext.util.HashMap&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},constructor:function(a){a=a||{};var c=this,b=a.keyFn;c.addEvents(&quot;add&quot;,&quot;clear&quot;,&quot;remove&quot;,&quot;replace&quot;);c.mixins.observable.constructor.call(c,a);c.clear(true);if(b){c.getKey=b}},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,d){var b=this,c;if(arguments.length===1){d=a;a=b.getKey(d)}if(b.containsKey(a)){return b.replace(a,d)}c=b.getData(a,d);a=c[0];d=c[1];b.map[a]=d;++b.length;b.fireEvent(&quot;add&quot;,b,a,d);return d},replace:function(b,d){var c=this,e=c.map,a;if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;c.fireEvent(&quot;replace&quot;,c,b,d,a);return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeAtKey(a)}return false},removeAtKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;b.fireEvent(&quot;remove&quot;,b,a,c);return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true){b.fireEvent(&quot;clear&quot;,b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new this.self(),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&amp;&amp;c[a]===b){return a}}return undefined}});Ext.define(&quot;Ext.data.SortTypes&quot;,{singleton:true,none:function(a){return a},stripTagsRE:/&lt;\/?[^&gt;]+&gt;/gi,asText:function(a){return String(a).replace(this.stripTagsRE,&quot;&quot;)},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,&quot;&quot;)},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,&quot;&quot;));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,&quot;&quot;),10);return isNaN(b)?0:b}});Ext.define(&quot;Ext.data.Connection&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},statics:{requestId:0},url:null,async:true,method:null,username:&quot;&quot;,password:&quot;&quot;,disableCaching:true,withCredentials:false,cors:false,disableCachingParam:&quot;_dc&quot;,timeout:30000,useDefaultHeader:true,defaultPostHeader:&quot;application/x-www-form-urlencoded; charset=UTF-8&quot;,useDefaultXhrHeader:true,defaultXhrHeader:&quot;XMLHttpRequest&quot;,constructor:function(a){a=a||{};Ext.apply(this,a);this.addEvents(&quot;beforerequest&quot;,&quot;requestcomplete&quot;,&quot;requestexception&quot;);this.requests={};this.mixins.observable.constructor.call(this)},request:function(j){j=j||{};var f=this,i=j.scope||window,e=j.username||f.username,g=j.password||f.password||&quot;&quot;,b,c,d,a,h;if(f.fireEvent(&quot;beforerequest&quot;,f,j)!==false){c=f.setOptions(j,i);if(this.isFormUpload(j)===true){this.upload(j.form,c.url,c.data,j);return null}if(j.autoAbort===true||f.autoAbort){f.abort()}if((j.cors===true||f.cors===true)&amp;&amp;Ext.isIe&amp;&amp;Ext.ieVersion&gt;=8){h=new XDomainRequest()}else{h=this.getXhrInstance()}b=j.async!==false?(j.async||f.async):false;if(e){h.open(c.method,c.url,b,e,g)}else{h.open(c.method,c.url,b)}if(j.withCredentials===true||f.withCredentials===true){h.withCredentials=true}a=f.setupHeaders(h,j,c.data,c.params);d={id:++Ext.data.Connection.requestId,xhr:h,headers:a,options:j,async:b,timeout:setTimeout(function(){d.timedout=true;f.abort(d)},j.timeout||f.timeout)};f.requests[d.id]=d;f.latestId=d.id;if(b){h.onreadystatechange=Ext.Function.bind(f.onStateChange,f,[d])}h.send(c.data);if(!b){return this.onComplete(d)}return d}else{Ext.callback(j.callback,j.scope,[j,undefined,undefined]);return null}},upload:function(d,b,h,j){d=Ext.getDom(d);j=j||{};var c=Ext.id(),f=document.createElement(&quot;iframe&quot;),i=[],g=&quot;multipart/form-data&quot;,e={target:d.target,method:d.method,encoding:d.encoding,enctype:d.enctype,action:d.action},a;Ext.fly(f).set({id:c,name:c,cls:Ext.baseCSSPrefix+&quot;hide-display&quot;,src:Ext.SSL_SECURE_URL});document.body.appendChild(f);if(document.frames){document.frames[c].name=c}Ext.fly(d).set({target:c,method:&quot;POST&quot;,enctype:g,encoding:g,action:b||e.action});if(h){Ext.iterate(Ext.Object.fromQueryString(h),function(k,l){a=document.createElement(&quot;input&quot;);Ext.fly(a).set({type:&quot;hidden&quot;,value:l,name:k});d.appendChild(a);i.push(a)})}Ext.fly(f).on(&quot;load&quot;,Ext.Function.bind(this.onUploadComplete,this,[f,j]),null,{single:true});d.submit();Ext.fly(d).set(e);Ext.each(i,function(k){Ext.removeNode(k)})},onUploadComplete:function(h,b){var c=this,a={responseText:&quot;&quot;,responseXML:null},g,f;try{g=h.contentWindow.document||h.contentDocument||window.frames[h.id].document;if(g){if(g.body){if(/textarea/i.test((f=g.body.firstChild||{}).tagName)){a.responseText=f.value}else{a.responseText=g.body.innerHTML}}a.responseXML=g.XMLDocument||g}}catch(d){}c.fireEvent(&quot;requestcomplete&quot;,c,a,b);Ext.callback(b.success,b.scope,[a,b]);Ext.callback(b.callback,b.scope,[b,true,a]);setTimeout(function(){Ext.removeNode(h)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(/multipart\/form-data/i).test(b.getAttribute(&quot;enctype&quot;)))}return false},getForm:function(a){return Ext.getDom(a.form)||null},setOptions:function(k,j){var h=this,e=k.params||{},g=h.extraParams,d=k.urlParams,c=k.url||h.url,i=k.jsonData,b,a,f;if(Ext.isFunction(e)){e=e.call(j,k)}if(Ext.isFunction(c)){c=c.call(j,k)}c=this.setupUrl(k,c);f=k.rawData||k.xmlData||i||null;if(i&amp;&amp;!Ext.isPrimitive(i)){f=Ext.encode(f)}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(g)){g=Ext.Object.toQueryString(g)}e=e+((g)?((e)?&quot;&amp;&quot;:&quot;&quot;)+g:&quot;&quot;);d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(k,e);b=(k.method||h.method||((e||f)?&quot;POST&quot;:&quot;GET&quot;)).toUpperCase();this.setupMethod(k,b);a=k.disableCaching!==false?(k.disableCaching||h.disableCaching):false;if(b===&quot;GET&quot;&amp;&amp;a){c=Ext.urlAppend(c,(k.disableCachingParam||h.disableCachingParam)+&quot;=&quot;+(new Date().getTime()))}if((b==&quot;GET&quot;||f)&amp;&amp;e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:f||e||null}},setupUrl:function(b,a){var c=this.getForm(b);if(c){a=a||c.action}return a},setupParams:function(a,d){var c=this.getForm(a),b;if(c&amp;&amp;!this.isFormUpload(a)){b=Ext.Element.serializeForm(c);d=d?(d+&quot;&amp;&quot;+b):b}return d},setupMethod:function(a,b){if(this.isFormUpload(a)){return&quot;POST&quot;}return b},setupHeaders:function(l,m,d,c){var h=this,b=Ext.apply({},m.headers||{},h.defaultHeaders||{}),k=h.defaultPostHeader,i=m.jsonData,a=m.xmlData,j,f;if(!b[&quot;Content-Type&quot;]&amp;&amp;(d||c)){if(d){if(m.rawData){k=&quot;text/plain&quot;}else{if(a&amp;&amp;Ext.isDefined(a)){k=&quot;text/xml&quot;}else{if(i&amp;&amp;Ext.isDefined(i)){k=&quot;application/json&quot;}}}}b[&quot;Content-Type&quot;]=k}if(h.useDefaultXhrHeader&amp;&amp;!b[&quot;X-Requested-With&quot;]){b[&quot;X-Requested-With&quot;]=h.defaultXhrHeader}try{for(j in b){if(b.hasOwnProperty(j)){f=b[j];l.setRequestHeader(j,f)}}}catch(g){h.fireEvent(&quot;exception&quot;,j,f)}return b},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject(&quot;MSXML2.XMLHTTP.3.0&quot;)},function(){return new ActiveXObject(&quot;MSXML2.XMLHTTP&quot;)},function(){return new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;)}],c=0,a=b.length,f;for(;c&lt;a;++c){try{f=b[c];f();break}catch(d){}}return f})(),isLoading:function(a){if(!a){a=this.getLatest()}if(!(a&amp;&amp;a.xhr)){return false}var b=a.xhr.readyState;return !(b===0||b==4)},abort:function(b){var a=this;if(!b){b=a.getLatest()}if(b&amp;&amp;a.isLoading(b)){b.xhr.onreadystatechange=null;b.xhr.abort();a.clearTimeout(b);if(!b.timedout){b.aborted=true}a.onComplete(b);a.cleanup(b)}},abortAll:function(){var b=this.requests,a;for(a in b){if(b.hasOwnProperty(a)){this.abort(b[a])}}},getLatest:function(){var b=this.latestId,a;if(b){a=this.requests[b]}return a||null},onStateChange:function(a){if(a.xhr.readyState==4){this.clearTimeout(a);this.onComplete(a);this.cleanup(a)}},clearTimeout:function(a){clearTimeout(a.timeout);delete a.timeout},cleanup:function(a){a.xhr=null;delete a.xhr},onComplete:function(f){var d=this,c=f.options,a,h,b;try{a=d.parseStatus(f.xhr.status)}catch(g){a={success:false,isException:false}}h=a.success;if(h){b=d.createResponse(f);d.fireEvent(&quot;requestcomplete&quot;,d,b,c);Ext.callback(c.success,c.scope,[b,c])}else{if(a.isException||f.aborted||f.timedout){b=d.createException(f)}else{b=d.createResponse(f)}d.fireEvent(&quot;requestexception&quot;,d,b,c);Ext.callback(c.failure,c.scope,[b,c])}Ext.callback(c.callback,c.scope,[c,h,b]);delete d.requests[f.id];return b},parseStatus:function(a){a=a==1223?204:a;var c=(a&gt;=200&amp;&amp;a&lt;300)||a==304,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var h=c.xhr,a={},i=h.getAllResponseHeaders().replace(/\r\n/g,&quot;\n&quot;).split(&quot;\n&quot;),d=i.length,j,e,g,f,b;while(d--){j=i[d];e=j.indexOf(&quot;:&quot;);if(e&gt;=0){g=j.substr(0,e).toLowerCase();if(j.charAt(e+1)==&quot; &quot;){++e}a[g]=j.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:h.status,statusText:h.statusText,getResponseHeader:function(k){return a[k.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:h.responseText,responseXML:h.responseXML};h=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?&quot;transaction aborted&quot;:&quot;communication failure&quot;,aborted:a.aborted,timedout:a.timedout}}});Ext.define(&quot;Ext.util.Filter&quot;,{anyMatch:false,exactMatch:false,caseSensitive:false,constructor:function(a){var b=this;Ext.apply(b,a);b.filter=b.filter||b.filterFn;if(b.filter===undefined){if(b.property===undefined||b.value===undefined){}else{b.filter=b.createFilterFn()}b.filterFn=b.filter}},createFilterFn:function(){var a=this,c=a.createValueMatcher(),b=a.property;return function(d){var e=a.getRoot.call(a,d)[b];return c===null?e===null:c.test(e)}},getRoot:function(b){var a=this.root;return a===undefined?b:b[a]},createValueMatcher:function(){var d=this,e=d.value,f=d.anyMatch,c=d.exactMatch,a=d.caseSensitive,b=Ext.String.escapeRegex;if(e===null){return e}if(!e.exec){e=String(e);if(f===true){e=b(e)}else{e=&quot;^&quot;+b(e);if(c===true){e+=&quot;$&quot;}}e=new RegExp(e,a?&quot;&quot;:&quot;i&quot;)}return e}});Ext.define(&quot;Ext.util.Sorter&quot;,{direction:&quot;ASC&quot;,constructor:function(a){var b=this;Ext.apply(b,a);b.updateSortFunction()},createSortFunction:function(b){var c=this,d=c.property,e=c.direction||&quot;ASC&quot;,a=e.toUpperCase()==&quot;DESC&quot;?-1:1;return function(g,f){return a*b.call(c,g,f)}},defaultSorterFn:function(d,c){var b=this,a=b.transform,f=b.getRoot(d)[b.property],e=b.getRoot(c)[b.property];if(a){f=a(f);e=a(e)}return f&gt;e?1:(f&lt;e?-1:0)},getRoot:function(a){return this.root===undefined?a:a[this.root]},setDirection:function(b){var a=this;a.direction=b;a.updateSortFunction()},toggle:function(){var a=this;a.direction=Ext.String.toggle(a.direction,&quot;ASC&quot;,&quot;DESC&quot;);a.updateSortFunction()},updateSortFunction:function(a){var b=this;a=a||b.sorterFn||b.defaultSorterFn;b.sort=b.createSortFunction(a)}});Ext.define(&quot;Ext.data.writer.Writer&quot;,{alias:&quot;writer.base&quot;,alternateClassName:[&quot;Ext.data.DataWriter&quot;,&quot;Ext.data.Writer&quot;],writeAllFields:true,nameProperty:&quot;name&quot;,constructor:function(a){Ext.apply(this,a)},write:function(e){var c=e.operation,b=c.records||[],a=b.length,d=0,f=[];for(;d&lt;a;d++){f.push(this.getRecordData(b[d]))}return this.writeRecords(e,f)},getRecordData:function(e){var i=e.phantom===true,b=this.writeAllFields||i,c=this.nameProperty,f=e.fields,d={},h,a,g,j;if(b){f.each(function(k){if(k.persist){a=k[c]||k.name;d[a]=e.get(k.name)}})}else{h=e.getChanges();for(j in h){if(h.hasOwnProperty(j)){g=f.get(j);a=g[c]||g.name;d[a]=h[j]}}if(!i){d[e.idProperty]=e.getId()}}return d}});Ext.define(&quot;Ext.util.KeyMap&quot;,{alternateClassName:&quot;Ext.KeyMap&quot;,constructor:function(b,d,a){var c=this;Ext.apply(c,{el:Ext.get(b),eventName:a||c.eventName,bindings:[]});if(d){c.addBinding(d)}c.enable()},eventName:&quot;keydown&quot;,addBinding:function(g){if(Ext.isArray(g)){Ext.each(g,this.addBinding,this);return}var f=g.key,h=false,d,e,b,c,a;if(Ext.isString(f)){e=[];b=f.toUpperCase();for(c=0,a=b.length;c&lt;a;++c){e.push(b.charCodeAt(c))}f=e;h=true}if(!Ext.isArray(f)){f=[f]}if(!h){for(c=0,a=f.length;c&lt;a;++c){d=f[c];if(Ext.isString(d)){f[c]=d.toUpperCase().charCodeAt(0)}}}this.bindings.push(Ext.apply({keyCode:f},g))},handleKeyDown:function(c){if(this.enabled){var d=this.bindings,b=0,a=d.length;c=this.processEvent(c);for(;b&lt;a;++b){this.processBinding(d[b],c)}}},processEvent:function(a){return a},processBinding:function(f,a){if(this.checkModifiers(f,a)){var g=a.getKey(),j=f.fn||f.handler,k=f.scope||this,h=f.keyCode,b=f.defaultEventAction,c,e,d=new Ext.EventObjectImpl(a);for(c=0,e=h.length;c&lt;e;++c){if(g===h[c]){if(j.call(k,g,a)!==true&amp;&amp;b){d[b]()}break}}}},checkModifiers:function(h,f){var d=[&quot;shift&quot;,&quot;ctrl&quot;,&quot;alt&quot;],c=0,a=d.length,g,b;for(;c&lt;a;++c){b=d[c];g=h[b];if(!(g===undefined||(g===f[b+&quot;Key&quot;]))){return false}}return true},on:function(b,d,c){var g,a,e,f;if(Ext.isObject(b)&amp;&amp;!Ext.isArray(b)){g=b.key;a=b.shift;e=b.ctrl;f=b.alt}else{g=b}this.addBinding({key:g,shift:a,ctrl:e,alt:f,fn:d,scope:c})},isEnabled:function(){return this.enabled},enable:function(){var a=this;if(!a.enabled){a.el.on(a.eventName,a.handleKeyDown,a);a.enabled=true}},disable:function(){var a=this;if(a.enabled){a.el.removeListener(a.eventName,a.handleKeyDown,a);a.enabled=false}},setDisabled:function(a){if(a){this.disable()}else{this.enable()}},destroy:function(b){var a=this;a.bindings=[];a.disable();if(b===true){a.el.remove()}delete a.el}});Ext.define(&quot;Ext.util.Memento&quot;,function(){function d(g,f,h){g[h]=f[h]}function c(g,f,h){delete g[h]}function e(h,g,i){var f=h[i];if(f||h.hasOwnProperty(i)){a(g,i,f)}}function a(g,h,f){if(Ext.isDefined(f)){g[h]=f}else{delete g[h]}}function b(f,i,h,g){if(i){if(Ext.isArray(g)){Ext.each(g,function(j){f(i,h,j)})}else{f(i,h,g)}}}return{data:null,target:null,constructor:function(g,f){if(g){this.target=g;if(f){this.capture(f)}}},capture:function(f,g){b(d,this.data||(this.data={}),g||this.target,f)},remove:function(f){b(c,this.data,null,f)},restore:function(g,f,h){b(e,this.data,h||this.target,g);if(f!==false){this.remove(g)}},restoreAll:function(f,i){var h=this,g=i||this.target;Ext.Object.each(h.data,function(k,j){a(g,k,j)});if(f!==false){delete h.data}}}}());Ext.define(&quot;Ext.data.ResultSet&quot;,{loaded:true,count:0,total:0,success:false,constructor:function(a){Ext.apply(this,a);this.totalRecords=this.total;if(a.count===undefined){this.count=this.records.length}}});Ext.define(&quot;Ext.fx.CubicBezier&quot;,{singleton:true,cubicBezierAtTime:function(n,d,b,m,l,h){var i=3*d,k=3*(m-d)-i,a=1-i-k,g=3*b,j=3*(l-b)-g,o=1-g-j;function f(p){return((a*p+k)*p+i)*p}function c(p,r){var q=e(p,r);return((o*q+j)*q+g)*q}function e(p,w){var v,u,s,q,t,r;for(s=p,r=0;r&lt;8;r++){q=f(s)-p;if(Math.abs(q)&lt;w){return s}t=(3*a*s+2*k)*s+i;if(Math.abs(t)&lt;0.000001){break}s=s-q/t}v=0;u=1;s=p;if(s&lt;v){return v}if(s&gt;u){return u}while(v&lt;u){q=f(s);if(Math.abs(q-p)&lt;w){return s}if(p&gt;q){v=s}else{u=s}s=(u-v)/2+v}return s}return c(n,1/(200*h))},cubicBezier:function(b,e,a,c){var d=function(f){return Ext.fx.CubicBezier.cubicBezierAtTime(f,b,e,a,c,1)};d.toCSS3=function(){return&quot;cubic-bezier(&quot;+[b,e,a,c].join(&quot;,&quot;)+&quot;)&quot;};d.reverse=function(){return Ext.fx.CubicBezier.cubicBezier(1-a,1-c,1-b,1-e)};return d}});Ext.define(&quot;Ext.panel.Proxy&quot;,{alternateClassName:&quot;Ext.dd.PanelProxy&quot;,constructor:function(a,b){this.panel=a;this.id=this.panel.id+&quot;-ddproxy&quot;;Ext.apply(this,b)},insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost.el},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.unghost(null,false);delete this.ghost}},show:function(){if(!this.ghost){var a=this.panel.getSize();this.panel.el.setVisibilityMode(Ext.Element.DISPLAY);this.ghost=this.panel.ghost();if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:Ext.baseCSSPrefix+&quot;panel-dd-spacer&quot;});this.proxy.setSize(a)}}},repair:function(b,c,a){this.hide();if(typeof c==&quot;function&quot;){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}});Ext.define(&quot;Ext.Template&quot;,{requires:[&quot;Ext.DomHelper&quot;,&quot;Ext.util.Format&quot;],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||&quot;&quot;)}},constructor:function(d){var f=this,b=arguments,a=[],c=0,e=b.length,g;f.initialConfig={};if(e&gt;1){for(;c&lt;e;c++){g=b[c];if(typeof g==&quot;object&quot;){Ext.apply(f.initialConfig,g);Ext.apply(f,g)}else{a.push(g)}}d=a.join(&quot;&quot;)}else{if(Ext.isArray(d)){a.push(d.join(&quot;&quot;))}else{a.push(d)}}f.html=a.join(&quot;&quot;);if(f.compiled){f.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,applyTemplate:function(a){var f=this,c=f.disableFormats!==true,e=Ext.util.Format,b=f;if(f.compiled){return f.compiled(a)}function d(g,i,j,h){if(j&amp;&amp;c){if(h){h=[a[i]].concat(Ext.functionFactory(&quot;return [&quot;+h+&quot;];&quot;)())}else{h=[a[i]]}if(j.substr(0,5)==&quot;this.&quot;){return b[j.substr(5)].apply(b,h)}else{return e[j].apply(e,h)}}else{return a[i]!==undefined?a[i]:&quot;&quot;}}return f.html.replace(f.re,d)},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&amp;&amp;useFormat){args=args?&quot;,&quot;+args:&quot;&quot;;if(format.substr(0,5)!=&quot;this.&quot;){format=&quot;fm.&quot;+format+&quot;(&quot;}else{format=&quot;this.&quot;+format.substr(5)+&quot;(&quot;}}else{args=&quot;&quot;;format=&quot;(values['&quot;+name+&quot;'] == undefined ? '' : &quot;}return&quot;',&quot;+format+&quot;values['&quot;+name+&quot;']&quot;+args+&quot;) ,'&quot;}bodyReturn=me.html.replace(me.compileARe,&quot;\\\\&quot;).replace(me.compileBRe,&quot;\\n&quot;).replace(me.compileCRe,&quot;\\'&quot;).replace(me.re,fn);body=&quot;this.compiled = function(values){ return ['&quot;+bodyReturn+&quot;'].join('');};&quot;;eval(body);return me},insertFirst:function(b,a,c){return this.doInsert(&quot;afterBegin&quot;,b,a,c)},insertBefore:function(b,a,c){return this.doInsert(&quot;beforeBegin&quot;,b,a,c)},insertAfter:function(b,a,c){return this.doInsert(&quot;afterEnd&quot;,b,a,c)},append:function(b,a,c){return this.doInsert(&quot;beforeEnd&quot;,b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}},function(){this.createAlias(&quot;apply&quot;,&quot;applyTemplate&quot;)});Ext.define(&quot;Ext.fx.Queue&quot;,{requires:[&quot;Ext.util.HashMap&quot;],constructor:function(){this.targets=Ext.create(&quot;Ext.util.HashMap&quot;);this.fxQueue={}},getFxDefaults:function(a){var b=this.targets.get(a);if(b){return b.fxDefaults}return{}},setFxDefaults:function(a,c){var b=this.targets.get(a);if(b){b.fxDefaults=Ext.apply(b.fxDefaults||{},c)}},stopAnimation:function(b){var d=this,a=d.getFxQueue(b),c=a.length;while(c){a[c-1].end();c--}},getActiveAnimation:function(b){var a=this.getFxQueue(b);return(a&amp;&amp;!!a.length)?a[0]:false},hasFxBlock:function(b){var a=this.getFxQueue(b);return a&amp;&amp;a[0]&amp;&amp;a[0].block},getFxQueue:function(b){if(!b){return false}var c=this,a=c.fxQueue[b],d=c.targets.get(b);if(!d){return false}if(!a){c.fxQueue[b]=[];if(d.type!=&quot;element&quot;){d.target.on(&quot;destroy&quot;,function(){c.fxQueue[b]=[]})}}return c.fxQueue[b]},queueFx:function(d){var c=this,e=d.target,a,b;if(!e){return}a=c.getFxQueue(e.getId());b=a.length;if(b){if(d.concurrent){d.paused=false}else{a[b-1].on(&quot;afteranimate&quot;,function(){d.paused=false})}}else{d.paused=false}d.on(&quot;afteranimate&quot;,function(){Ext.Array.remove(a,d);if(d.remove){if(e.type==&quot;element&quot;){var f=Ext.get(e.id);if(f){f.remove()}}}},this);a.push(d)}});Ext.define(&quot;Ext.dd.StatusProxy&quot;,{animRepair:false,constructor:function(a){Ext.apply(this,a);this.id=this.id||Ext.id();this.proxy=Ext.createWidget(&quot;component&quot;,{floating:true,stateful:false,id:this.id,html:'&lt;div class=&quot;'+Ext.baseCSSPrefix+'dd-drop-icon&quot;&gt;&lt;/div&gt;&lt;div class=&quot;'+Ext.baseCSSPrefix+'dd-drag-ghost&quot;&gt;&lt;/div&gt;',cls:Ext.baseCSSPrefix+&quot;dd-drag-proxy &quot;+this.dropNotAllowed,shadow:!a||a.shadow!==false,renderTo:document.body});this.el=this.proxy.el;this.el.show();this.el.setVisibilityMode(Ext.Element.VISIBILITY);this.el.hide();this.ghost=Ext.get(this.el.dom.childNodes[1]);this.dropStatus=this.dropNotAllowed},dropAllowed:Ext.baseCSSPrefix+&quot;dd-drop-ok&quot;,dropNotAllowed:Ext.baseCSSPrefix+&quot;dd-drop-nodrop&quot;,setStatus:function(a){a=a||this.dropNotAllowed;if(this.dropStatus!=a){this.el.replaceCls(this.dropStatus,a);this.dropStatus=a}},reset:function(a){this.el.dom.className=Ext.baseCSSPrefix+&quot;dd-drag-proxy &quot;+this.dropNotAllowed;this.dropStatus=this.dropNotAllowed;if(a){this.ghost.update(&quot;&quot;)}},update:function(a){if(typeof a==&quot;string&quot;){this.ghost.update(a)}else{this.ghost.update(&quot;&quot;);a.style.margin=&quot;0&quot;;this.ghost.dom.appendChild(a)}var b=this.ghost.dom.firstChild;if(b){Ext.fly(b).setStyle(&quot;float&quot;,&quot;none&quot;)}},getEl:function(){return this.el},getGhost:function(){return this.ghost},hide:function(a){this.proxy.hide();if(a){this.reset(true)}},stop:function(){if(this.anim&amp;&amp;this.anim.isAnimated&amp;&amp;this.anim.isAnimated()){this.anim.stop()}},show:function(){this.proxy.show();this.proxy.toFront()},sync:function(){this.proxy.el.sync()},repair:function(b,c,a){this.callback=c;this.scope=a;if(b&amp;&amp;this.animRepair!==false){this.el.addCls(Ext.baseCSSPrefix+&quot;dd-drag-repair&quot;);this.el.hideUnders(true);this.anim=this.el.animate({duration:this.repairDuration||500,easing:&quot;ease-out&quot;,to:{x:b[0],y:b[1]},stopAnimation:true,callback:this.afterRepair,scope:this})}else{this.afterRepair()}},afterRepair:function(){this.hide(true);if(typeof this.callback==&quot;function&quot;){this.callback.call(this.scope||this)}this.callback=null;this.scope=null},destroy:function(){Ext.destroy(this.ghost,this.proxy,this.el)}});Ext.define(&quot;Ext.ZIndexManager&quot;,{alternateClassName:&quot;Ext.WindowGroup&quot;,statics:{zBase:9000},constructor:function(a){var b=this;b.list={};b.zIndexStack=[];b.front=null;if(a){if(a.isContainer){a.on(&quot;resize&quot;,b._onContainerResize,b);b.zseed=Ext.Number.from(a.getEl().getStyle(&quot;zIndex&quot;),b.getNextZSeed());b.targetEl=a.getTargetEl();b.container=a}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();b.targetEl=Ext.get(a)}}else{Ext.EventManager.onWindowResize(b._onContainerResize,b);b.zseed=b.getNextZSeed();Ext.onDocumentReady(function(){b.targetEl=Ext.getBody()})}},getNextZSeed:function(){return(Ext.ZIndexManager.zBase+=10000)},setBase:function(a){this.zseed=a;return this.assignZIndices()},assignZIndices:function(){var c=this.zIndexStack,b=c.length,e=0,f=this.zseed,d;for(;e&lt;b;e++){d=c[e];if(d&amp;&amp;!d.hidden){f=d.setZIndex(f)}}this._activateLast();return f},_setActiveChild:function(a){if(a!==this.front){if(this.front){this.front.setActive(false,a)}this.front=a;if(a){a.setActive(true);if(a.modal){this._showModalMask(a)}}}},_activateLast:function(a){var b,d=false,c;for(c=this.zIndexStack.length-1;c&gt;=0;--c){b=this.zIndexStack[c];if(!b.hidden){if(!d){this._setActiveChild(b);d=true}if(b.modal){this._showModalMask(b);return}}}this._hideModalMask();if(!d){this._setActiveChild(null)}},_showModalMask:function(a){var d=a.el.getStyle(&quot;zIndex&quot;)-4,b=a.floatParent?a.floatParent.getTargetEl():Ext.get(a.getEl().dom.parentNode),c;if(!b){return}c=b.getBox();if(!this.mask){this.mask=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+&quot;mask&quot;});this.mask.setVisibilityMode(Ext.Element.DISPLAY);this.mask.on(&quot;click&quot;,this._onMaskClick,this)}if(b.dom===document.body){c.height=Ext.Element.getViewHeight()}b.addCls(Ext.baseCSSPrefix+&quot;body-masked&quot;);this.mask.setBox(c);this.mask.setStyle(&quot;zIndex&quot;,d);this.mask.show()},_hideModalMask:function(){if(this.mask&amp;&amp;this.mask.dom.parentNode){Ext.get(this.mask.dom.parentNode).removeCls(Ext.baseCSSPrefix+&quot;body-masked&quot;);this.mask.hide()}},_onMaskClick:function(){if(this.front){this.front.focus()}},_onContainerResize:function(){if(this.mask&amp;&amp;this.mask.isVisible()){this.mask.setSize(Ext.get(this.mask.dom.parentNode).getViewSize(true))}},register:function(a){if(a.zIndexManager){a.zIndexManager.unregister(a)}a.zIndexManager=this;this.list[a.id]=a;this.zIndexStack.push(a);a.on(&quot;hide&quot;,this._activateLast,this)},unregister:function(a){delete a.zIndexManager;if(this.list&amp;&amp;this.list[a.id]){delete this.list[a.id];a.un(&quot;hide&quot;,this._activateLast);Ext.Array.remove(this.zIndexStack,a);this._activateLast(a)}},get:function(a){return typeof a==&quot;object&quot;?a:this.list[a]},bringToFront:function(a){a=this.get(a);if(a!==this.front){Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.push(a);this.assignZIndices();return true}if(a.modal){this._showModalMask(a)}return false},sendToBack:function(a){a=this.get(a);Ext.Array.remove(this.zIndexStack,a);this.zIndexStack.unshift(a);this.assignZIndices();return a},hideAll:function(){for(var a in this.list){if(this.list[a].isComponent&amp;&amp;this.list[a].isVisible()){this.list[a].hide()}}},hide:function(){var b=0,c=this.zIndexStack.length,a;this.tempHidden=[];for(;b&lt;c;b++){a=this.zIndexStack[b];if(a.isVisible()){this.tempHidden.push(a);a.hide()}}},show:function(){var c=0,d=this.tempHidden.length,b,a,e;for(;c&lt;d;c++){b=this.tempHidden[c];a=b.x;e=b.y;b.show();b.setPosition(a,e)}delete this.tempHidden},getActive:function(){return this.front},getBy:function(e,d){var f=[],c=0,a=this.zIndexStack.length,b;for(;c&lt;a;c++){b=this.zIndexStack[c];if(e.call(d||b,b)!==false){f.push(b)}}return f},each:function(c,b){var a;for(var d in this.list){a=this.list[d];if(a.isComponent&amp;&amp;c.call(b||a,a)===false){return}}},eachBottomUp:function(e,d){var b,a=this.zIndexStack,c,f;for(c=0,f=a.length;c&lt;f;c++){b=a[c];if(b.isComponent&amp;&amp;e.call(d||b,b)===false){return}}},eachTopDown:function(e,d){var b,a=this.zIndexStack,c;for(c=a.length;c--&gt;0;){b=a[c];if(b.isComponent&amp;&amp;e.call(d||b,b)===false){return}}},destroy:function(){this.each(function(a){a.destroy()});delete this.zIndexStack;delete this.list;delete this.container;delete this.targetEl}},function(){Ext.WindowManager=Ext.WindowMgr=new this()});Ext.define(&quot;Ext.ComponentQuery&quot;,{singleton:true,uses:[&quot;Ext.ComponentManager&quot;]},function(){var g=this,j=[&quot;var r = [],&quot;,&quot;i = 0,&quot;,&quot;it = items,&quot;,&quot;l = it.length,&quot;,&quot;c;&quot;,&quot;for (; i &lt; l; i++) {&quot;,&quot;c = it[i];&quot;,&quot;if (c.{0}) {&quot;,&quot;r.push(c);&quot;,&quot;}&quot;,&quot;}&quot;,&quot;return r;&quot;].join(&quot;&quot;),e=function(o,n){return n.method.apply(this,[o].concat(n.args))},a=function(p,t){var n=[],q=0,s=p.length,r,o=t!==&quot;&gt;&quot;;for(;q&lt;s;q++){r=p[q];if(r.getRefItems){n=n.concat(r.getRefItems(o))}}return n},f=function(o){var n=[],p=0,r=o.length,q;for(;p&lt;r;p++){q=o[p];while(!!(q=(q.ownerCt||q.floatParent))){n.push(q)}}return n},l=function(o,t,s){if(t===&quot;*&quot;){return o.slice()}else{var n=[],p=0,r=o.length,q;for(;p&lt;r;p++){q=o[p];if(q.isXType(t,s)){n.push(q)}}return n}},i=function(o,r){var t=Ext.Array,n=[],p=0,s=o.length,q;for(;p&lt;s;p++){q=o[p];if(q.el?q.el.hasCls(r):t.contains(q.initCls(),r)){n.push(q)}}return n},m=function(p,u,o,t){var n=[],q=0,s=p.length,r;for(;q&lt;s;q++){r=p[q];if(!t?!!r[u]:(String(r[u])===t)){n.push(r)}}return n},d=function(o,s){var n=[],p=0,r=o.length,q;for(;p&lt;r;p++){q=o[p];if(q.getItemId()===s){n.push(q)}}return n},k=function(n,o,p){return g.pseudos[o](n,p)},h=/^(\s?([&gt;\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:l},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['&quot;]?(.*?)[&quot;']?)?[\]])/,method:m},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s&gt;\/]*?(?!\})))\))?/,method:k},{re:/^(?:\{([^\}]+)\})/,method:j}];g.Query=Ext.extend(Object,{constructor:function(n){n=n||{};Ext.apply(this,n)},execute:function(o){var q=this.operations,r=0,s=q.length,p,n;if(!o){n=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(o)){n=o}}for(;r&lt;s;r++){p=q[r];if(p.mode===&quot;^&quot;){n=f(n||[o])}else{if(p.mode){n=a(n||[o],p.mode)}else{n=e(n||a([o]),p)}}if(r===s-1){return n}}return[]},is:function(p){var o=this.operations,s=Ext.isArray(p)?p:[p],n=s.length,t=o[o.length-1],r,q;s=e(s,t);if(s.length===n){if(o.length&gt;1){for(q=0,r=s.length;q&lt;r;q++){if(Ext.Array.indexOf(this.execute(),s[q])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(t,n){var u=Ext.ComponentQuery,r=0,s=t.length,q=[],p=-1,o;for(;r&lt;s;++r){o=t[r];if(!u.is(o,n)){q[++p]=o}}return q},last:function(n){return n[n.length-1]}},query:function(o,v){var w=o.split(&quot;,&quot;),n=w.length,p=0,q=[],x=[],u={},s,r,t;for(;p&lt;n;p++){o=Ext.String.trim(w[p]);s=this.cache[o];if(!s){this.cache[o]=s=this.parse(o)}q=q.concat(s.execute(v))}if(n&gt;1){r=q.length;for(p=0;p&lt;r;p++){t=q[p];if(!u[t.id]){x.push(t);u[t.id]=true}}q=x}return q},is:function(o,n){if(!n){return true}var p=this.cache[n];if(!p){this.cache[n]=p=this.parse(n)}return p.is(o)},parse:function(q){var o=[],p=b.length,u,r,v,w,x,s,t,n;while(q&amp;&amp;u!==q){u=q;r=q.match(c);if(r){v=r[1];if(v===&quot;#&quot;){o.push({method:d,args:[Ext.String.trim(r[2])]})}else{if(v===&quot;.&quot;){o.push({method:i,args:[Ext.String.trim(r[2])]})}else{o.push({method:l,args:[Ext.String.trim(r[2]),Boolean(r[3])]})}}q=q.replace(r[0],&quot;&quot;)}while(!(w=q.match(h))){for(s=0;q&amp;&amp;s&lt;p;s++){t=b[s];x=q.match(t.re);n=t.method;if(x){o.push({method:Ext.isString(t.method)?Ext.functionFactory(&quot;items&quot;,Ext.String.format.apply(Ext.String,[n].concat(x.slice(1)))):t.method,args:x.slice(1)});q=q.replace(x[0],&quot;&quot;);break}}}if(w[1]){o.push({mode:w[2]||w[1]});q=q.replace(w[0],&quot;&quot;)}}return new g.Query({operations:o})}})});Ext.define(&quot;Ext.util.KeyNav&quot;,{alternateClassName:&quot;Ext.KeyNav&quot;,requires:[&quot;Ext.util.KeyMap&quot;],statics:{keyOptions:{left:37,right:39,up:38,down:40,space:32,pageUp:33,pageDown:34,del:46,backspace:8,home:36,end:35,enter:13,esc:27,tab:9}},constructor:function(b,a){this.setConfig(b,a||{})},setConfig:function(d,a){if(this.map){this.map.destroy()}var f=Ext.create(&quot;Ext.util.KeyMap&quot;,d,null,this.getKeyEvent(&quot;forceKeyDown&quot; in a?a.forceKeyDown:this.forceKeyDown)),e=Ext.util.KeyNav.keyOptions,c=a.scope||this,b;this.map=f;for(b in e){if(e.hasOwnProperty(b)){if(a[b]){f.addBinding({scope:c,key:e[b],handler:Ext.Function.bind(this.handleEvent,c,[a[b]],true),defaultEventAction:a.defaultEventAction||this.defaultEventAction})}}}f.disable();if(!a.disabled){f.enable()}},handleEvent:function(c,b,a){return a.call(this,b)},disabled:false,defaultEventAction:&quot;stopEvent&quot;,forceKeyDown:false,destroy:function(a){this.map.destroy(a);delete this.map},enable:function(){this.map.enable();this.disabled=false},disable:function(){this.map.disable();this.disabled=true},setDisabled:function(a){this.map.setDisabled(a);this.disabled=a},getKeyEvent:function(a){return(a||Ext.EventManager.useKeyDown)?&quot;keydown&quot;:&quot;keypress&quot;}});Ext.define(&quot;Ext.fx.target.Target&quot;,{isAnimTarget:true,constructor:function(a){this.target=a;this.id=this.getId()},getId:function(){return this.target.id}});Ext.define(&quot;Ext.draw.Color&quot;,{colorToHexRe:/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/,rgbRe:/\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*/,hexRe:/\s*#([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/,lightnessFactor:0.2,constructor:function(d,c,a){var b=this,e=Ext.Number.constrain;b.r=e(d,0,255);b.g=e(c,0,255);b.b=e(a,0,255)},getRed:function(){return this.r},getGreen:function(){return this.g},getBlue:function(){return this.b},getRGB:function(){var a=this;return[a.r,a.g,a.b]},getHSL:function(){var i=this,a=i.r/255,f=i.g/255,j=i.b/255,k=Math.max(a,f,j),d=Math.min(a,f,j),m=k-d,e,n=0,c=0.5*(k+d);if(d!=k){n=(c&lt;0.5)?m/(k+d):m/(2-k-d);if(a==k){e=60*(f-j)/m}else{if(f==k){e=120+60*(j-a)/m}else{e=240+60*(a-f)/m}}if(e&lt;0){e+=360}if(e&gt;=360){e-=360}}return[e,n,c]},getLighter:function(b){var a=this.getHSL();b=b||this.lightnessFactor;a[2]=Ext.Number.constrain(a[2]+b,0,1);return this.fromHSL(a[0],a[1],a[2])},getDarker:function(a){a=a||this.lightnessFactor;return this.getLighter(-a)},toString:function(){var f=this,c=Math.round,e=c(f.r).toString(16),d=c(f.g).toString(16),a=c(f.b).toString(16);e=(e.length==1)?&quot;0&quot;+e:e;d=(d.length==1)?&quot;0&quot;+d:d;a=(a.length==1)?&quot;0&quot;+a:a;return[&quot;#&quot;,e,d,a].join(&quot;&quot;)},toHex:function(b){if(Ext.isArray(b)){b=b[0]}if(!Ext.isString(b)){return&quot;&quot;}if(b.substr(0,1)===&quot;#&quot;){return b}var e=this.colorToHexRe.exec(b);if(Ext.isArray(e)){var f=parseInt(e[2],10),d=parseInt(e[3],10),a=parseInt(e[4],10),c=a|(d&lt;&lt;8)|(f&lt;&lt;16);return e[1]+&quot;#&quot;+(&quot;000000&quot;+c.toString(16)).slice(-6)}else{return&quot;&quot;}},fromString:function(h){var c,e,d,a,f=parseInt;if((h.length==4||h.length==7)&amp;&amp;h.substr(0,1)===&quot;#&quot;){c=h.match(this.hexRe);if(c){e=f(c[1],16)&gt;&gt;0;d=f(c[2],16)&gt;&gt;0;a=f(c[3],16)&gt;&gt;0;if(h.length==4){e+=(e*16);d+=(d*16);a+=(a*16)}}}else{c=h.match(this.rgbRe);if(c){e=c[1];d=c[2];a=c[3]}}return(typeof e==&quot;undefined&quot;)?undefined:Ext.create(&quot;Ext.draw.Color&quot;,e,d,a)},getGrayscale:function(){return this.r*0.3+this.g*0.59+this.b*0.11},fromHSL:function(f,n,d){var a,b,c,e,j=[],k=Math.abs,g=Math.floor;if(n==0||f==null){j=[d,d,d]}else{f/=60;a=n*(1-k(2*d-1));b=a*(1-k(f-2*g(f/2)-1));c=d-a/2;switch(g(f)){case 0:j=[a,b,0];break;case 1:j=[b,a,0];break;case 2:j=[0,a,b];break;case 3:j=[0,b,a];break;case 4:j=[b,0,a];break;case 5:j=[a,0,b];break}j=[j[0]+c,j[1]+c,j[2]+c]}return Ext.create(&quot;Ext.draw.Color&quot;,j[0]*255,j[1]*255,j[2]*255)}},function(){var a=this.prototype;this.addStatics({fromHSL:function(){return a.fromHSL.apply(a,arguments)},fromString:function(){return a.fromString.apply(a,arguments)},toHex:function(){return a.toHex.apply(a,arguments)}})});Ext.define(&quot;Ext.layout.Layout&quot;,{isLayout:true,initialized:false,statics:{create:function(b,c){var a;if(b instanceof Ext.layout.Layout){return Ext.createByAlias(&quot;layout.&quot;+b)}else{if(!b||typeof b===&quot;string&quot;){a=b||c;b={}}else{a=b.type||c}return Ext.createByAlias(&quot;layout.&quot;+a,b||{})}}},constructor:function(a){this.id=Ext.id(null,this.type+&quot;-&quot;);Ext.apply(this,a)},layout:function(){var a=this;a.layoutBusy=true;a.initLayout();if(a.beforeLayout.apply(a,arguments)!==false){a.layoutCancelled=false;a.onLayout.apply(a,arguments);a.childrenChanged=false;a.owner.needsLayout=false;a.layoutBusy=false;a.afterLayout.apply(a,arguments)}else{a.layoutCancelled=true}a.layoutBusy=false;a.doOwnerCtLayouts()},beforeLayout:function(){this.renderChildren();return true},renderChildren:function(){this.renderItems(this.getLayoutItems(),this.getRenderTarget())},renderItems:function(a,f){var e=this,d=a.length,b=0,c;for(;b&lt;d;b++){c=a[b];if(c&amp;&amp;!c.rendered){e.renderItem(c,f,b)}else{if(!e.isValidParent(c,f,b)){e.moveItem(c,f,b)}else{e.configureItem(c)}}}},isValidParent:function(b,c,a){var d=b.el?b.el.dom:Ext.getDom(b);if(d&amp;&amp;c&amp;&amp;c.dom){if(Ext.isNumber(a)&amp;&amp;d!==c.dom.childNodes[a]){return false}return(d.parentNode==(c.dom||c))}return false},renderItem:function(c,d,a){var b=this;if(!c.rendered){if(b.itemCls){c.addCls(b.itemCls)}if(b.owner.itemCls){c.addCls(b.owner.itemCls)}c.render(d,a);b.configureItem(c);b.childrenChanged=true}},moveItem:function(b,c,a){c=c.dom||c;if(typeof a==&quot;number&quot;){a=c.childNodes[a]}c.insertBefore(b.el.dom,a||null);b.container=Ext.get(c);this.configureItem(b);this.childrenChanged=true},initLayout:function(){var a=this,b=a.targetCls;if(!a.initialized&amp;&amp;!Ext.isEmpty(b)){a.getTarget().addCls(b)}a.initialized=true},setOwner:function(a){this.owner=a},getLayoutItems:function(){return[]},configureItem:Ext.emptyFn,onLayout:Ext.emptyFn,afterLayout:Ext.emptyFn,onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,doOwnerCtLayouts:Ext.emptyFn,afterRemove:function(c){var b=c.el,a=this.owner,e=this.itemCls,d=a.itemCls;if(c.rendered&amp;&amp;!c.isDestroyed){if(e){b.removeCls(e)}if(d){b.removeCls(d)}}delete c.layoutManagedWidth;delete c.layoutManagedHeight},destroy:function(){var b=this.targetCls,a;if(!Ext.isEmpty(b)){a=this.getTarget();if(a){a.removeCls(b)}}this.onDestroy()}});Ext.define(&quot;Ext.util.Floating&quot;,{uses:[&quot;Ext.Layer&quot;,&quot;Ext.window.Window&quot;],focusOnToFront:true,shadow:&quot;sides&quot;,constructor:function(a){var b=this;b.floating=true;b.el=Ext.create(&quot;Ext.Layer&quot;,Ext.apply({},a,{hideMode:b.hideMode,hidden:b.hidden,shadow:Ext.isDefined(b.shadow)?b.shadow:&quot;sides&quot;,shadowOffset:b.shadowOffset,constrain:false,shim:b.shim===false?false:undefined}),b.el)},onFloatRender:function(){var a=this;a.zIndexParent=a.getZIndexParent();a.setFloatParent(a.ownerCt);delete a.ownerCt;if(a.zIndexParent){a.zIndexParent.registerFloatingItem(a)}else{Ext.WindowManager.register(a)}},setFloatParent:function(b){var a=this;if(a.floatParent){a.mun(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}a.floatParent=b;if(b){a.mon(a.floatParent,{hide:a.onFloatParentHide,show:a.onFloatParentShow,scope:a})}if((a.constrain||a.constrainHeader)&amp;&amp;!a.constrainTo){a.constrainTo=b?b.getTargetEl():a.container}},onFloatParentHide:function(){var a=this;if(a.hideOnParentHide!==false){a.showOnParentShow=a.isVisible();a.hide()}},onFloatParentShow:function(){if(this.showOnParentShow){delete this.showOnParentShow;this.show()}},getZIndexParent:function(){var a=this.ownerCt,b;if(a){while(a){b=a;a=a.ownerCt}if(b.floating){return b}}},setZIndex:function(a){var b=this;b.el.setZIndex(a);a+=10;if(b.floatingItems){a=Math.floor(b.floatingItems.setBase(a)/100)*100+10000}return a},doConstrain:function(b){var c=this,a=c.getConstrainVector(b||c.el.getScopeParent()),d;if(a){d=c.getPosition();d[0]+=a[0];d[1]+=a[1];c.setPosition(d)}},getConstrainVector:function(b){var c=this,a;if(c.constrain||c.constrainHeader){a=c.constrainHeader?c.header.el:c.el;b=b||(c.floatParent&amp;&amp;c.floatParent.getTargetEl())||c.container;return a.getConstrainVector(b)}},alignTo:function(b,a,c){if(b.isComponent){b=b.getEl()}var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d);return this},toFront:function(b){var a=this;if(a.zIndexParent){a.zIndexParent.toFront(true)}if(a.zIndexManager.bringToFront(a)){if(!Ext.isDefined(b)){b=!a.focusOnToFront}if(!b){a.focus(false,true)}}return a},setActive:function(b,c){var a=this;if(b){if(a.el.shadow&amp;&amp;!a.maximized){a.el.enableShadow(true)}a.fireEvent(&quot;activate&quot;,a)}else{if((a instanceof Ext.window.Window)&amp;&amp;(c instanceof Ext.window.Window)){a.el.disableShadow()}a.fireEvent(&quot;deactivate&quot;,a)}},toBack:function(){this.zIndexManager.sendToBack(this);return this},center:function(){var a=this,b=a.el.getAlignToXY(a.container,&quot;c-c&quot;);a.setPagePosition(b);return a},syncShadow:function(){if(this.floating){this.el.sync(true)}},fitContainer:function(){var c=this.floatParent,a=c?c.getTargetEl():this.container,b=a.getViewSize(false);this.setSize(b)}});Ext.define(&quot;Ext.layout.container.boxOverflow.None&quot;,{alternateClassName:&quot;Ext.layout.boxOverflow.None&quot;,constructor:function(b,a){this.layout=b;Ext.apply(this,a||{})},handleOverflow:Ext.emptyFn,clearOverflow:Ext.emptyFn,onRemove:Ext.emptyFn,getItem:function(a){return this.layout.owner.getComponent(a)},onRemove:Ext.emptyFn});Ext.define(&quot;Ext.util.Offset&quot;,{statics:{fromObject:function(a){return new this(a.x,a.y)}},constructor:function(a,b){this.x=(a!=null&amp;&amp;!isNaN(a))?a:0;this.y=(b!=null&amp;&amp;!isNaN(b))?b:0;return this},copy:function(){return new Ext.util.Offset(this.x,this.y)},copyFrom:function(a){this.x=a.x;this.y=a.y},toString:function(){return&quot;Offset[&quot;+this.x+&quot;,&quot;+this.y+&quot;]&quot;},equals:function(a){return(this.x==a.x&amp;&amp;this.y==a.y)},round:function(b){if(!isNaN(b)){var a=Math.pow(10,b);this.x=Math.round(this.x*a)/a;this.y=Math.round(this.y*a)/a}else{this.x=Math.round(this.x);this.y=Math.round(this.y)}},isZero:function(){return this.x==0&amp;&amp;this.y==0}});Ext.define(&quot;Ext.util.Animate&quot;,{uses:[&quot;Ext.fx.Manager&quot;,&quot;Ext.fx.Anim&quot;],animate:function(a){var b=this;if(Ext.fx.Manager.hasFxBlock(b.id)){return b}Ext.fx.Manager.queueFx(Ext.create(&quot;Ext.fx.Anim&quot;,b.anim(a)));return this},anim:function(a){if(!Ext.isObject(a)){return(a)?{}:false}var b=this;if(a.stopAnimation){b.stopAnimation()}Ext.applyIf(a,Ext.fx.Manager.getFxDefaults(b.id));return Ext.apply({target:b,paused:true},a)},stopFx:Ext.Function.alias(Ext.util.Animate,&quot;stopAnimation&quot;),stopAnimation:function(){Ext.fx.Manager.stopAnimation(this.id);return this},syncFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:true});return this},sequenceFx:function(){Ext.fx.Manager.setFxDefaults(this.id,{concurrent:false});return this},hasActiveFx:Ext.Function.alias(Ext.util.Animate,&quot;getActiveAnimation&quot;),getActiveAnimation:function(){return Ext.fx.Manager.getActiveAnimation(this.id)}},function(){Ext.applyIf(Ext.Element.prototype,this.prototype);Ext.CompositeElementLite.importElementMethods()});Ext.define(&quot;Ext.layout.container.AbstractContainer&quot;,{extend:&quot;Ext.layout.Layout&quot;,type:&quot;container&quot;,bindToOwnerCtComponent:false,bindToOwnerCtContainer:false,setItemSize:function(c,b,a){if(Ext.isObject(b)){a=b.height;b=b.width}c.setCalculatedSize(b,a,this.owner)},getLayoutItems:function(){return this.owner&amp;&amp;this.owner.items&amp;&amp;this.owner.items.items||[]},beforeLayout:function(){return !this.owner.collapsed&amp;&amp;this.callParent(arguments)},afterLayout:function(){this.owner.afterLayout(this)},getTarget:function(){return this.owner.getTargetEl()},getRenderTarget:function(){return this.owner.getTargetEl()}});Ext.define(&quot;Ext.util.ClickRepeater&quot;,{extend:&quot;Ext.util.Observable&quot;,constructor:function(b,a){this.el=Ext.get(b);this.el.unselectable();Ext.apply(this,a);this.addEvents(&quot;mousedown&quot;,&quot;click&quot;,&quot;mouseup&quot;);if(!this.disabled){this.disabled=true;this.enable()}if(this.handler){this.on(&quot;click&quot;,this.handler,this.scope||this)}this.callParent()},interval:20,delay:250,preventDefault:true,stopDefault:false,timer:0,enable:function(){if(this.disabled){this.el.on(&quot;mousedown&quot;,this.handleMouseDown,this);if(Ext.isIE){this.el.on(&quot;dblclick&quot;,this.handleDblClick,this)}if(this.preventDefault||this.stopDefault){this.el.on(&quot;click&quot;,this.eventOptions,this)}}this.disabled=false},disable:function(a){if(a||!this.disabled){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}Ext.getDoc().un(&quot;mouseup&quot;,this.handleMouseUp,this);this.el.removeAllListeners()}this.disabled=true},setDisabled:function(a){this[a?&quot;disable&quot;:&quot;enable&quot;]()},eventOptions:function(a){if(this.preventDefault){a.preventDefault()}if(this.stopDefault){a.stopEvent()}},destroy:function(){this.disable(true);Ext.destroy(this.el);this.clearListeners()},handleDblClick:function(a){clearTimeout(this.timer);this.el.blur();this.fireEvent(&quot;mousedown&quot;,this,a);this.fireEvent(&quot;click&quot;,this,a)},handleMouseDown:function(a){clearTimeout(this.timer);this.el.blur();if(this.pressedCls){this.el.addCls(this.pressedCls)}this.mousedownTime=new Date();Ext.getDoc().on(&quot;mouseup&quot;,this.handleMouseUp,this);this.el.on(&quot;mouseout&quot;,this.handleMouseOut,this);this.fireEvent(&quot;mousedown&quot;,this,a);this.fireEvent(&quot;click&quot;,this,a);if(this.accelerate){this.delay=400}a=new Ext.EventObjectImpl(a);this.timer=Ext.defer(this.click,this.delay||this.interval,this,[a])},click:function(a){this.fireEvent(&quot;click&quot;,this,a);this.timer=Ext.defer(this.click,this.accelerate?this.easeOutExpo(Ext.Date.getElapsed(this.mousedownTime),400,-390,12000):this.interval,this,[a])},easeOutExpo:function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a},handleMouseOut:function(){clearTimeout(this.timer);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.el.on(&quot;mouseover&quot;,this.handleMouseReturn,this)},handleMouseReturn:function(){this.el.un(&quot;mouseover&quot;,this.handleMouseReturn,this);if(this.pressedCls){this.el.addCls(this.pressedCls)}this.click()},handleMouseUp:function(a){clearTimeout(this.timer);this.el.un(&quot;mouseover&quot;,this.handleMouseReturn,this);this.el.un(&quot;mouseout&quot;,this.handleMouseOut,this);Ext.getDoc().un(&quot;mouseup&quot;,this.handleMouseUp,this);if(this.pressedCls){this.el.removeCls(this.pressedCls)}this.fireEvent(&quot;mouseup&quot;,this,a)}});Ext.define(&quot;Ext.util.TextMetrics&quot;,{statics:{shared:null,measure:function(a,d,e){var b=this,c=b.shared;if(!c){c=b.shared=new b(a,e)}c.bind(a);c.setFixedWidth(e||&quot;auto&quot;);return c.getSize(d)},destroy:function(){var a=this;Ext.destroy(a.shared);a.shared=null}},constructor:function(a,c){var b=this.measure=Ext.getBody().createChild({cls:&quot;x-textmetrics&quot;});this.el=Ext.get(a);b.position(&quot;absolute&quot;);b.setLeftTop(-1000,-1000);b.hide();if(c){b.setWidth(c)}},getSize:function(c){var b=this.measure,a;b.update(c);a=b.getSize();b.update(&quot;&quot;);return a},bind:function(a){var b=this;b.el=Ext.get(a);b.measure.setStyle(b.el.getStyles(&quot;font-size&quot;,&quot;font-style&quot;,&quot;font-weight&quot;,&quot;font-family&quot;,&quot;line-height&quot;,&quot;text-transform&quot;,&quot;letter-spacing&quot;))},setFixedWidth:function(a){this.measure.setWidth(a)},getWidth:function(a){this.measure.dom.style.width=&quot;auto&quot;;return this.getSize(a).width},getHeight:function(a){return this.getSize(a).height},destroy:function(){var a=this;a.measure.remove();delete a.el;delete a.measure}},function(){Ext.Element.addMethods({getTextWidth:function(c,b,a){return Ext.Number.constrain(Ext.util.TextMetrics.measure(this.dom,Ext.value(c,this.dom.innerHTML,true)).width,b||0,a||1000000)}})});Ext.define(&quot;Ext.state.Provider&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},prefix:&quot;ext-&quot;,constructor:function(a){a=a||{};var b=this;Ext.apply(b,a);b.addEvents(&quot;statechange&quot;);b.state={};b.mixins.observable.constructor.call(b)},get:function(b,a){return typeof this.state[b]==&quot;undefined&quot;?a:this.state[b]},clear:function(a){var b=this;delete b.state[a];b.fireEvent(&quot;statechange&quot;,b,a,null)},set:function(a,c){var b=this;b.state[a]=c;b.fireEvent(&quot;statechange&quot;,b,a,c)},decodeValue:function(f){var d=this,c=/^(a|n|d|b|s|o|e)\:(.*)$/,e=c.exec(unescape(f)),b,a,f,g;if(!e||!e[1]){return}a=e[1];f=e[2];switch(a){case&quot;e&quot;:return null;case&quot;n&quot;:return parseFloat(f);case&quot;d&quot;:return new Date(Date.parse(f));case&quot;b&quot;:return(f==&quot;1&quot;);case&quot;a&quot;:b=[];if(f!=&quot;&quot;){Ext.each(f.split(&quot;^&quot;),function(h){b.push(d.decodeValue(h))},d)}return b;case&quot;o&quot;:b={};if(f!=&quot;&quot;){Ext.each(f.split(&quot;^&quot;),function(h){g=h.split(&quot;=&quot;);b[g[0]]=d.decodeValue(g[1])},d)}return b;default:return f}},encodeValue:function(e){var f=&quot;&quot;,d=0,b,a,c;if(e==null){return&quot;e:1&quot;}else{if(typeof e==&quot;number&quot;){b=&quot;n:&quot;+e}else{if(typeof e==&quot;boolean&quot;){b=&quot;b:&quot;+(e?&quot;1&quot;:&quot;0&quot;)}else{if(Ext.isDate(e)){b=&quot;d:&quot;+e.toGMTString()}else{if(Ext.isArray(e)){for(a=e.length;d&lt;a;d++){f+=this.encodeValue(e[d]);if(d!=a-1){f+=&quot;^&quot;}}b=&quot;a:&quot;+f}else{if(typeof e==&quot;object&quot;){for(c in e){if(typeof e[c]!=&quot;function&quot;&amp;&amp;e[c]!==undefined){f+=c+&quot;=&quot;+this.encodeValue(e[c])+&quot;^&quot;}}b=&quot;o:&quot;+f.substring(0,f.length-1)}else{b=&quot;s:&quot;+e}}}}}}return escape(b)}});Ext.define(&quot;Ext.app.Controller&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},onClassExtended:function(h,c){var g=Ext.getClassName(h),d=g.match(/^(.*)\.controller\./);if(d!==null){var a=Ext.Loader.getPrefix(g)||d[1],f=c.onBeforeClassCreated,i=[],b=[&quot;model&quot;,&quot;view&quot;,&quot;store&quot;],e;c.onBeforeClassCreated=function(s,m){var n,p,k,q,l,o,r;for(n=0,p=b.length;n&lt;p;n++){k=b[n];q=Ext.Array.from(m[k+&quot;s&quot;]);for(l=0,o=q.length;l&lt;o;l++){r=q[l];e=Ext.Loader.getPrefix(r);if(e===&quot;&quot;||e===r){i.push(a+&quot;.&quot;+k+&quot;.&quot;+r)}else{i.push(r)}}}Ext.require(i,Ext.Function.pass(f,arguments,this))}}},constructor:function(a){this.mixins.observable.constructor.call(this,a);Ext.apply(this,a||{});this.createGetters(&quot;model&quot;,this.models);this.createGetters(&quot;store&quot;,this.stores);this.createGetters(&quot;view&quot;,this.views);if(this.refs){this.ref(this.refs)}},init:function(a){},onLaunch:function(a){},createGetters:function(b,a){b=Ext.String.capitalize(b);Ext.Array.each(a,function(d){var c=&quot;get&quot;,e=d.split(&quot;.&quot;);Ext.Array.each(e,function(f){c+=Ext.String.capitalize(f)});c+=b;if(!this[c]){this[c]=Ext.Function.pass(this[&quot;get&quot;+b],[d],this)}this[c](d)},this)},ref:function(a){var b=this;a=Ext.Array.from(a);Ext.Array.each(a,function(e){var d=e.ref,c=&quot;get&quot;+Ext.String.capitalize(d);if(!b[c]){b[c]=Ext.Function.pass(b.getRef,[d,e],b)}})},getRef:function(e,f,b){this.refCache=this.refCache||{};f=f||{};b=b||{};Ext.apply(f,b);if(f.forceCreate){return Ext.ComponentManager.create(f,&quot;component&quot;)}var d=this,a=f.selector,c=d.refCache[e];if(!c){d.refCache[e]=c=Ext.ComponentQuery.query(f.selector)[0];if(!c&amp;&amp;f.autoCreate){d.refCache[e]=c=Ext.ComponentManager.create(f,&quot;component&quot;)}if(c){c.on(&quot;beforedestroy&quot;,function(){d.refCache[e]=null})}}return c},control:function(a,b){this.application.control(a,b,this)},getController:function(a){return this.application.getController(a)},getStore:function(a){return this.application.getStore(a)},getModel:function(a){return this.application.getModel(a)},getView:function(a){return this.application.getView(a)}});Ext.define(&quot;Ext.app.EventBus&quot;,{requires:[&quot;Ext.util.Event&quot;],mixins:{observable:&quot;Ext.util.Observable&quot;},constructor:function(){this.mixins.observable.constructor.call(this);this.bus={};var a=this;Ext.override(Ext.Component,{fireEvent:function(b){if(Ext.util.Observable.prototype.fireEvent.apply(this,arguments)!==false){return a.dispatch.call(a,b,this,arguments)}return false}})},dispatch:function(k,f,j){var g=this.bus,l=g[k],d,c,b,m,a,e,h;if(l){for(d in l){if(f.is(d)){c=l[d];for(b in c){m=c[b];for(e=0,h=m.length;e&lt;h;e++){a=m[e];if(a.fire.apply(a,Array.prototype.slice.call(j,1))===false){return false}}}}}}},control:function(d,f,c){var b=this.bus,a,e;if(Ext.isString(d)){a=d;d={};d[a]=f;this.control(d,null,c);return}Ext.Object.each(d,function(g,h){Ext.Object.each(h,function(l,m){var i={},j=c,k=Ext.create(&quot;Ext.util.Event&quot;,c,l);if(Ext.isObject(m)){i=m;m=i.fn;j=i.scope||c;delete i.fn;delete i.scope}k.addListener(m,j,i);b[l]=b[l]||{};b[l][g]=b[l][g]||{};b[l][g][c.id]=b[l][g][c.id]||[];b[l][g][c.id].push(k)})})}});Ext.define(&quot;Ext.AbstractManager&quot;,{requires:[&quot;Ext.util.HashMap&quot;],typeName:&quot;type&quot;,constructor:function(a){Ext.apply(this,a||{});this.all=Ext.create(&quot;Ext.util.HashMap&quot;);this.types={}},get:function(a){return this.all.get(a)},register:function(a){this.all.add(a)},unregister:function(a){this.all.remove(a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b},isRegistered:function(a){return this.types[a]!==undefined},create:function(a,d){var b=a[this.typeName]||a.type||d,c=this.types[b];return new c(a)},onAvailable:function(e,c,b){var a=this.all,d;if(a.containsKey(e)){d=a.get(e);c.call(b||d,d)}else{a.on(&quot;add&quot;,function(h,f,g){if(f==e){c.call(b||g,g);a.un(&quot;add&quot;,c,b)}})}},each:function(b,a){this.all.each(b,a||this)},getCount:function(){return this.all.getCount()}});Ext.define(&quot;Ext.ModelManager&quot;,{extend:&quot;Ext.AbstractManager&quot;,alternateClassName:&quot;Ext.ModelMgr&quot;,requires:[&quot;Ext.data.Association&quot;],singleton:true,typeName:&quot;mtype&quot;,associationStack:[],registerType:function(c,b){var d=b.prototype,a;if(d&amp;&amp;d.isModel){a=b}else{if(!b.extend){b.extend=&quot;Ext.data.Model&quot;}a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:function(c){var a=this.associationStack,f=a.length,e=[],b,d,g;for(d=0;d&lt;f;d++){b=a[d];if(b.associatedModel==c.modelName){e.push(b)}}for(d=0,f=e.length;d&lt;f;d++){g=e[d];this.types[g.ownerModel].prototype.associations.add(Ext.data.Association.create(g));Ext.Array.remove(a,g)}},registerDeferredAssociation:function(a){this.associationStack.push(a)},getModel:function(b){var a=b;if(typeof a==&quot;string&quot;){a=this.types[a]}return a},create:function(c,b,d){var a=typeof b==&quot;function&quot;?b:this.types[b||c.name];return new a(c,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define(&quot;Ext.ComponentManager&quot;,{extend:&quot;Ext.AbstractManager&quot;,alternateClassName:&quot;Ext.ComponentMgr&quot;,singleton:true,typeName:&quot;xtype&quot;,create:function(b,d){if(b instanceof Ext.AbstractComponent){return b}else{if(Ext.isString(b)){return Ext.createByAlias(&quot;widget.&quot;+b)}else{var c=b.xtype||d,a=b;return Ext.createByAlias(&quot;widget.&quot;+c,a)}}},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b;a.prototype[this.typeName]=b}});Ext.define(&quot;Ext.data.Types&quot;,{singleton:true,requires:[&quot;Ext.data.SortTypes&quot;]},function(){var a=Ext.data.SortTypes;Ext.apply(Ext.data.Types,{stripRe:/[\$,%]/g,AUTO:{convert:function(b){return b},sortType:a.none,type:&quot;auto&quot;},STRING:{convert:function(c){var b=this.useNull?null:&quot;&quot;;return(c===undefined||c===null)?b:String(c)},sortType:a.asUCString,type:&quot;string&quot;},INT:{convert:function(b){return b!==undefined&amp;&amp;b!==null&amp;&amp;b!==&quot;&quot;?parseInt(String(b).replace(Ext.data.Types.stripRe,&quot;&quot;),10):(this.useNull?null:0)},sortType:a.none,type:&quot;int&quot;},FLOAT:{convert:function(b){return b!==undefined&amp;&amp;b!==null&amp;&amp;b!==&quot;&quot;?parseFloat(String(b).replace(Ext.data.Types.stripRe,&quot;&quot;),10):(this.useNull?null:0)},sortType:a.none,type:&quot;float&quot;},BOOL:{convert:function(b){if(this.useNull&amp;&amp;(b===undefined||b===null||b===&quot;&quot;)){return null}return b===true||b===&quot;true&quot;||b==1},sortType:a.none,type:&quot;bool&quot;},DATE:{convert:function(c){var d=this.dateFormat,b;if(!c){return null}if(Ext.isDate(c)){return c}if(d){if(d==&quot;timestamp&quot;){return new Date(c*1000)}if(d==&quot;time&quot;){return new Date(parseInt(c,10))}return Ext.Date.parse(c,d)}b=Date.parse(c);return b?new Date(b):null},sortType:a.asDate,type:&quot;date&quot;}});Ext.apply(Ext.data.Types,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define(&quot;Ext.data.Field&quot;,{requires:[&quot;Ext.data.Types&quot;,&quot;Ext.data.SortTypes&quot;],alias:&quot;data.field&quot;,constructor:function(b){if(Ext.isString(b)){b={name:b}}Ext.apply(this,b);var d=Ext.data.Types,a=this.sortType,c;if(this.type){if(Ext.isString(this.type)){this.type=d[this.type.toUpperCase()]||d.AUTO}}else{this.type=d.AUTO}if(Ext.isString(a)){this.sortType=Ext.data.SortTypes[a]}else{if(Ext.isEmpty(a)){this.sortType=this.type.sortType}}if(!this.convert){this.convert=this.type.convert}},dateFormat:null,useNull:false,defaultValue:&quot;&quot;,mapping:null,sortType:null,sortDir:&quot;ASC&quot;,allowBlank:true,persist:true});Ext.define(&quot;Ext.Ajax&quot;,{extend:&quot;Ext.data.Connection&quot;,singleton:true,autoAbort:false});Ext.define(&quot;Ext.util.AbstractMixedCollection&quot;,{requires:[&quot;Ext.util.Filter&quot;],mixins:{observable:&quot;Ext.util.Observable&quot;},constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.addEvents(&quot;clear&quot;,&quot;add&quot;,&quot;replace&quot;,&quot;remove&quot;);c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,f=e,c=b,a;if(arguments.length==1){f=c;c=d.getKey(f)}if(typeof c!=&quot;undefined&quot;&amp;&amp;c!==null){a=d.map[c];if(typeof a!=&quot;undefined&quot;){return d.replace(c,f)}d.map[c]=f}d.length++;d.items.push(f);d.keys.push(c);d.fireEvent(&quot;add&quot;,d.length-1,f,c);return f},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c==&quot;undefined&quot;||c===null||typeof a==&quot;undefined&quot;){return d.add(c,e)}b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent(&quot;replace&quot;,c,a,e);return e},addAll:function(f){var e=this,d=0,b,a,c;if(arguments.length&gt;1||Ext.isArray(f)){b=arguments.length&gt;1?arguments:f;for(a=b.length;d&lt;a;d++){e.add(b[d])}}else{for(c in f){if(f.hasOwnProperty(c)){if(e.allowFunctions||typeof f[c]!=&quot;function&quot;){e.add(c,f[c])}}}}},each:function(e,d){var b=[].concat(this.items),c=0,a=b.length,f;for(;c&lt;a;c++){f=b[c];if(e.call(d||f,f,c,a)===false){break}}},eachKey:function(e,d){var f=this.keys,b=this.items,c=0,a=f.length;for(;c&lt;a;c++){e.call(d||window,f[c],b[c],c,a)}},findBy:function(e,d){var f=this.keys,b=this.items,c=0,a=b.length;for(;c&lt;a;c++){if(e.call(d||window,b[c],f[c])){return b[c]}}return null},find:function(){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn(&quot;Ext.util.MixedCollection: find has been deprecated. Use findBy instead.&quot;)}return this.findBy.apply(this,arguments)},insert:function(a,b,e){var d=this,c=b,f=e;if(arguments.length==2){f=c;c=d.getKey(f)}if(d.containsKey(c)){d.suspendEvents();d.removeAtKey(c);d.resumeEvents()}if(a&gt;=d.length){return d.add(c,f)}d.length++;Ext.Array.splice(d.items,a,0,f);if(typeof c!=&quot;undefined&quot;&amp;&amp;c!==null){d.map[c]=f}Ext.Array.splice(d.keys,a,0,c);d.fireEvent(&quot;add&quot;,a,f,c);return f},remove:function(a){return this.removeAt(this.indexOf(a))},removeAll:function(a){Ext.each(a||[],function(b){this.remove(b)},this);return this},removeAt:function(a){var c=this,d,b;if(a&lt;c.length&amp;&amp;a&gt;=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!=&quot;undefined&quot;){delete c.map[b]}Ext.Array.erase(c.keys,a,1);c.fireEvent(&quot;remove&quot;,d,b);return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b==&quot;number&quot;)?d.items[b]:undefined;return typeof c!=&quot;function&quot;||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return Ext.Array.contains(this.items,a)},containsKey:function(a){return typeof this.map[a]!=&quot;undefined&quot;},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.fireEvent(&quot;clear&quot;)},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(g,b,h,a){var c=this.extractValues(g,b),f=c.length,e=0,d;h=h||0;a=(a||a===0)?a:f-1;for(d=h;d&lt;=a;d++){e+=c[d]}return e},collect:function(j,e,g){var k=this.extractValues(j,e),a=k.length,b={},c=[],h,f,d;for(d=0;d&lt;a;d++){h=k[d];f=String(h);if((g||!Ext.isEmpty(h))&amp;&amp;!b[f]){b[f]=true;c.push(h)}}return c},extractValues:function(c,a){var b=this.items;if(a){b=Ext.Array.pluck(b,a)}return Ext.Array.pluck(b,c)},getRange:function(f,a){var e=this,c=e.items,b=[],d;if(c.length&lt;1){return b}f=f||0;a=Math.min(typeof a==&quot;undefined&quot;?e.length-1:a,e.length-1);if(f&lt;=a){for(d=f;d&lt;=a;d++){b[b.length]=c[d]}}else{for(d=f;d&gt;=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,f,a){var b=[],e;if(Ext.isString(d)){b.push(Ext.create(&quot;Ext.util.Filter&quot;,{property:d,value:c,anyMatch:f,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(g){var m=true,n=b.length,h;for(h=0;h&lt;n;h++){var l=b[h],k=l.filterFn,j=l.scope;m=m&amp;&amp;k.call(j,g)}return m};return this.filterBy(e)},filterBy:function(e,d){var h=this,a=new this.self(),g=h.keys,b=h.items,f=b.length,c;a.getKey=h.getKey;for(c=0;c&lt;f;c++){if(e.call(d||h,b[c],g[c])){a.add(g[c],b[c])}}return a},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(f){return f&amp;&amp;b.test(f[c])},null,e)},findIndexBy:function(e,d,h){var g=this,f=g.keys,b=g.items,c=h||0,a=b.length;for(;c&lt;a;c++){if(e.call(d||g,b[c],f[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.String.escapeRegex;c=String(c);if(e===true){c=d(c)}else{c=&quot;^&quot;+d(c);if(b===true){c+=&quot;$&quot;}}c=new RegExp(c,a?&quot;&quot;:&quot;i&quot;)}return c},clone:function(){var e=this,f=new this.self(),d=e.keys,b=e.items,c=0,a=b.length;for(;c&lt;a;c++){f.add(d[c],b[c])}f.getKey=e.getKey;return f}});Ext.define(&quot;Ext.util.Sortable&quot;,{isSortable:true,defaultSortDirection:&quot;ASC&quot;,requires:[&quot;Ext.util.Sorter&quot;],initSortable:function(){var a=this,b=a.sorters;a.sorters=Ext.create(&quot;Ext.util.AbstractMixedCollection&quot;,false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(g,f,c,e){var d=this,h,b,a;if(Ext.isArray(g)){e=c;c=f;a=g}else{if(Ext.isObject(g)){e=c;c=f;a=[g]}else{if(Ext.isString(g)){h=d.sorters.get(g);if(!h){h={property:g,direction:f};a=[h]}else{if(f===undefined){h.toggle()}else{h.setDirection(f)}}}}}if(a&amp;&amp;a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c===&quot;prepend&quot;){g=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(g)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}}if(e!==false){d.onBeforeSort(a);g=d.sorters.items;if(g.length){b=function(l,k){var j=g[0].sort(l,k),n=g.length,m;for(m=1;m&lt;n;m++){j=j||g[m].sort.call(this,l,k)}return j};d.doSort(b)}}return g},onBeforeSort:Ext.emptyFn,decodeSorters:function(f){if(!Ext.isArray(f)){if(f===undefined){f=[]}else{f=[f]}}var d=f.length,g=Ext.util.Sorter,a=this.model?this.model.prototype.fields:null,e,b,c;for(c=0;c&lt;d;c++){b=f[c];if(!(b instanceof g)){if(Ext.isString(b)){b={property:b}}Ext.applyIf(b,{root:this.sortRoot,direction:&quot;ASC&quot;});if(b.fn){b.sorterFn=b.fn}if(typeof b==&quot;function&quot;){b={sorterFn:b}}if(a&amp;&amp;!b.transform){e=a.get(b.property);b.transform=e?e.sortType:undefined}f[c]=Ext.create(&quot;Ext.util.Sorter&quot;,b)}}return f},getSorters:function(){return this.sorters.items}});Ext.define(&quot;Ext.util.MixedCollection&quot;,{extend:&quot;Ext.util.AbstractMixedCollection&quot;,mixins:{sortable:&quot;Ext.util.Sortable&quot;},constructor:function(){var a=this;a.callParent(arguments);a.addEvents(&quot;sort&quot;);a.mixins.sortable.initSortable.call(a)},doSort:function(a){this.sortBy(a)},_sort:function(k,a,j){var h=this,d,e,b=String(a).toUpperCase()==&quot;DESC&quot;?-1:1,g=[],l=h.keys,f=h.items;j=j||function(i,c){return i-c};for(d=0,e=f.length;d&lt;e;d++){g[g.length]={key:l[d],value:f[d],index:d}}Ext.Array.sort(g,function(i,c){var m=j(i[k],c[k])*b;if(m===0){m=(i.index&lt;c.index?-1:1)}return m});for(d=0,e=g.length;d&lt;e;d++){f[d]=g[d].value;l[d]=g[d].key}h.fireEvent(&quot;sort&quot;,h)},sortBy:function(c){var g=this,b=g.items,f=g.keys,e=b.length,a=[],d;for(d=0;d&lt;e;d++){a[d]={key:f[d],value:b[d],index:d}}Ext.Array.sort(a,function(i,h){var j=c(i.value,h.value);if(j===0){j=(i.index&lt;h.index?-1:1)}return j});for(d=0;d&lt;e;d++){b[d]=a[d].value;f[d]=a[d].key}g.fireEvent(&quot;sort&quot;,g,b,f)},reorder:function(d){var g=this,b=g.items,c=0,f=b.length,a=[],e=[],h;g.suspendEvents();for(h in d){a[d[h]]=b[h]}for(c=0;c&lt;f;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c&lt;f;c++){if(a[c]==undefined){a[c]=e.shift()}}g.clear();g.addAll(a);g.resumeEvents();g.fireEvent(&quot;sort&quot;,g)},sortByKey:function(a,b){this._sort(&quot;key&quot;,a,b||function(d,c){var f=String(d).toUpperCase(),e=String(c).toUpperCase();return f&gt;e?1:(f&lt;e?-1:0)})}});Ext.define(&quot;Ext.data.StoreManager&quot;,{extend:&quot;Ext.util.MixedCollection&quot;,alternateClassName:[&quot;Ext.StoreMgr&quot;,&quot;Ext.data.StoreMgr&quot;,&quot;Ext.StoreManager&quot;],singleton:true,uses:[&quot;Ext.data.ArrayStore&quot;],register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(c){if(Ext.isArray(c)){var b=[&quot;field1&quot;],e=!Ext.isArray(c[0]),f=c,d,a;if(e){f=[];for(d=0,a=c.length;d&lt;a;++d){f.push([c[d]])}}else{for(d=2,a=c[0].length;d&lt;=a;++d){b.push(&quot;field&quot;+d)}}return Ext.create(&quot;Ext.data.ArrayStore&quot;,{data:f,fields:b,autoDestroy:true,autoCreated:true,expanded:e})}if(Ext.isString(c)){return this.get(c)}else{return Ext.data.AbstractStore.create(c)}},getKey:function(a){return a.storeId}},function(){Ext.regStore=function(c,b){var a;if(Ext.isObject(c)){b=c}else{b.storeId=c}if(b instanceof Ext.data.Store){a=b}else{a=Ext.create(&quot;Ext.data.Store&quot;,b)}return Ext.data.StoreManager.register(a)};Ext.getStore=function(a){return Ext.data.StoreManager.lookup(a)}});Ext.define(&quot;Ext.data.Errors&quot;,{extend:&quot;Ext.util.MixedCollection&quot;,isValid:function(){return this.length===0},getByField:function(e){var d=[],a,c,b;for(b=0;b&lt;this.length;b++){a=this.items[b];if(a.field==e){d.push(a)}}return d}});Ext.define(&quot;Ext.data.writer.Json&quot;,{extend:&quot;Ext.data.writer.Writer&quot;,alternateClassName:&quot;Ext.data.JsonWriter&quot;,alias:&quot;writer.json&quot;,root:undefined,encode:false,allowSingle:true,writeRecords:function(b,c){var a=this.root;if(this.allowSingle&amp;&amp;c.length==1){c=c[0]}if(this.encode){if(a){b.params[a]=Ext.encode(c)}else{}}else{b.jsonData=b.jsonData||{};if(a){b.jsonData[a]=c}else{b.jsonData=c}}return b}});Ext.define(&quot;Ext.data.reader.Reader&quot;,{requires:[&quot;Ext.data.ResultSet&quot;],alternateClassName:[&quot;Ext.data.Reader&quot;,&quot;Ext.data.DataReader&quot;],totalProperty:&quot;total&quot;,successProperty:&quot;success&quot;,root:&quot;&quot;,implicitIncludes:true,isReader:true,constructor:function(a){var b=this;Ext.apply(b,a||{});b.fieldCount=0;b.model=Ext.ModelManager.getModel(a.model);if(b.model){b.buildExtractors()}},setModel:function(a,c){var b=this;b.model=Ext.ModelManager.getModel(a);b.buildExtractors(true);if(c&amp;&amp;b.proxy){b.proxy.setModel(b.model,true)}},read:function(a){var b=a;if(a&amp;&amp;a.responseText){b=this.getResponseData(a)}if(b){return this.readRecords(b)}else{return this.nullResultSet}},readRecords:function(c){var d=this;if(d.fieldCount!==d.getFields().length){d.buildExtractors(true)}d.rawData=c;c=d.getData(c);var f=Ext.isArray(c)?c:d.getRoot(c),h=true,b=0,e,g,a,i;if(f){e=f.length}if(d.totalProperty){g=parseInt(d.getTotal(c),10);if(!isNaN(g)){e=g}}if(d.successProperty){g=d.getSuccess(c);if(g===false||g===&quot;false&quot;){h=false}}if(d.messageProperty){i=d.getMessage(c)}if(f){a=d.extractData(f);b=a.length}else{b=0;a=[]}return Ext.create(&quot;Ext.data.ResultSet&quot;,{total:e||b,count:b,records:a,success:h,message:i})},extractData:function(j){var h=this,k=[],e=[],d=h.model,f=0,b=j.length,l=h.getIdProperty(),c,a,g;if(!j.length&amp;&amp;Ext.isObject(j)){j=[j];b=1}for(;f&lt;b;f++){c=j[f];k=h.extractValues(c);a=h.getId(c);g=new d(k,a,c);e.push(g);if(h.implicitIncludes){h.readAssociated(g,c)}}return e},readAssociated:function(g,e){var d=g.associations.items,f=0,a=d.length,c,b,j,h;for(;f&lt;a;f++){c=d[f];b=this.getAssociatedDataRoot(e,c.associationKey||c.name);if(b){h=c.getReader();if(!h){j=c.associatedModel.proxy;if(j){h=j.getReader()}else{h=new this.constructor({model:c.associatedName})}}c.read(g,h,b)}}},getAssociatedDataRoot:function(b,a){return b[a]},getFields:function(){return this.model.prototype.fields.items},extractValues:function(f){var a=this.getFields(),c=0,d=a.length,b={},g,e;for(;c&lt;d;c++){g=a[c];e=this.extractorFunctions[c](f);b[g.name]=e}return b},getData:function(a){return a},getRoot:function(a){return a},getResponseData:function(a){},onMetaChange:function(c){var a=c.fields,b;Ext.apply(this,c);if(a){b=Ext.define(&quot;Ext.data.reader.Json-Model&quot;+Ext.id(),{extend:&quot;Ext.data.Model&quot;,fields:a});this.setModel(b,true)}else{this.buildExtractors(true)}},getIdProperty:function(){var a=this.idProperty;if(Ext.isEmpty(a)){a=this.model.prototype.idProperty}return a},buildExtractors:function(e){var c=this,g=c.getIdProperty(),d=c.totalProperty,b=c.successProperty,f=c.messageProperty,a;if(e===true){delete c.extractorFunctions}if(c.extractorFunctions){return}if(d){c.getTotal=c.createAccessor(d)}if(b){c.getSuccess=c.createAccessor(b)}if(f){c.getMessage=c.createAccessor(f)}if(g){a=c.createAccessor(g);c.getId=function(h){var i=a.call(c,h);return(i===undefined||i===&quot;&quot;)?null:i}}else{c.getId=function(){return null}}c.buildFieldExtractors()},buildFieldExtractors:function(){var d=this,a=d.getFields(),c=a.length,b=0,g=[],f,e;for(;b&lt;c;b++){f=a[b];e=(f.mapping!==undefined&amp;&amp;f.mapping!==null)?f.mapping:f.name;g.push(d.createAccessor(e))}d.fieldCount=c;d.extractorFunctions=g}},function(){Ext.apply(this,{nullResultSet:Ext.create(&quot;Ext.data.ResultSet&quot;,{total:0,count:0,records:[],success:true})})});Ext.define(&quot;Ext.data.reader.Json&quot;,{extend:&quot;Ext.data.reader.Reader&quot;,alternateClassName:&quot;Ext.data.JsonReader&quot;,alias:&quot;reader.json&quot;,root:&quot;&quot;,useSimpleAccessors:false,readRecords:function(a){if(a.metaData){this.onMetaChange(a.metaData)}this.jsonData=a;return this.callParent([a])},getResponseData:function(a){var c;try{c=Ext.decode(a.responseText)}catch(b){Ext.Error.raise({response:a,json:a.responseText,parseError:b,msg:&quot;Unable to parse the JSON returned by the server: &quot;+b.toString()})}return c},buildExtractors:function(){var a=this;a.callParent(arguments);if(a.root){a.getRoot=a.createAccessor(a.root)}else{a.getRoot=function(b){return b}}},extractData:function(a){var e=this.record,d=[],c,b;if(e){c=a.length;if(!c&amp;&amp;Ext.isObject(a)){c=1;a=[a]}for(b=0;b&lt;c;b++){d[b]=a[b][e]}}else{d=a}return this.callParent([d])},createAccessor:function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}if(this.useSimpleAccessors!==true){var b=String(c).search(a);if(b&gt;=0){return Ext.functionFactory(&quot;obj&quot;,&quot;return obj&quot;+(b&gt;0?&quot;.&quot;:&quot;&quot;)+c)}}return function(d){return d[c]}}}()});Ext.define(&quot;Ext.data.proxy.Proxy&quot;,{alias:&quot;proxy.proxy&quot;,alternateClassName:[&quot;Ext.data.DataProxy&quot;,&quot;Ext.data.Proxy&quot;],requires:[&quot;Ext.data.reader.Json&quot;,&quot;Ext.data.writer.Json&quot;],uses:[&quot;Ext.data.Batch&quot;,&quot;Ext.data.Operation&quot;,&quot;Ext.data.Model&quot;],mixins:{observable:&quot;Ext.util.Observable&quot;},batchOrder:&quot;create,update,destroy&quot;,batchActions:true,defaultReaderType:&quot;json&quot;,defaultWriterType:&quot;json&quot;,isProxy:true,constructor:function(a){a=a||{};if(a.model===undefined){delete a.model}this.mixins.observable.constructor.call(this,a);if(this.model!==undefined&amp;&amp;!(this.model instanceof Ext.data.Model)){this.setModel(this.model)}},setModel:function(b,c){this.model=Ext.ModelManager.getModel(b);var a=this.reader,d=this.writer;this.setReader(a);this.setWriter(d);if(c&amp;&amp;this.store){this.store.setModel(this.model)}},getModel:function(){return this.model},setReader:function(a){var b=this;if(a===undefined||typeof a==&quot;string&quot;){a={type:a}}if(a.isReader){a.setModel(b.model)}else{Ext.applyIf(a,{proxy:b,model:b.model,type:b.defaultReaderType});a=Ext.createByAlias(&quot;reader.&quot;+a.type,a)}b.reader=a;return b.reader},getReader:function(){return this.reader},setWriter:function(a){if(a===undefined||typeof a==&quot;string&quot;){a={type:a}}if(!(a instanceof Ext.data.writer.Writer)){Ext.applyIf(a,{model:this.model,type:this.defaultWriterType});a=Ext.createByAlias(&quot;writer.&quot;+a.type,a)}this.writer=a;return this.writer},getWriter:function(){return this.writer},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,batch:function(d,e){var f=this,c=Ext.create(&quot;Ext.data.Batch&quot;,{proxy:f,listeners:e||{}}),b=f.batchActions,a;Ext.each(f.batchOrder.split(&quot;,&quot;),function(g){a=d[g];if(a){if(b){c.add(Ext.create(&quot;Ext.data.Operation&quot;,{action:g,records:a}))}else{Ext.each(a,function(h){c.add(Ext.create(&quot;Ext.data.Operation&quot;,{action:g,records:[h]}))})}}},f);c.start();return c}},function(){Ext.data.DataProxy=this});Ext.define(&quot;Ext.data.proxy.Server&quot;,{extend:&quot;Ext.data.proxy.Proxy&quot;,alias:&quot;proxy.server&quot;,alternateClassName:&quot;Ext.data.ServerProxy&quot;,uses:[&quot;Ext.data.Request&quot;],pageParam:&quot;page&quot;,startParam:&quot;start&quot;,limitParam:&quot;limit&quot;,groupParam:&quot;group&quot;,sortParam:&quot;sort&quot;,filterParam:&quot;filter&quot;,directionParam:&quot;dir&quot;,simpleSortMode:false,noCache:true,cacheString:&quot;_dc&quot;,timeout:30000,constructor:function(a){var b=this;a=a||{};this.addEvents(&quot;exception&quot;);b.callParent([a]);b.extraParams=a.extraParams||{};b.api=a.api||{};b.nocache=b.noCache},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},buildRequest:function(a){var c=Ext.applyIf(a.params||{},this.extraParams||{}),b;c=Ext.applyIf(c,this.getParams(a));if(a.id&amp;&amp;!c.id){c.id=a.id}b=Ext.create(&quot;Ext.data.Request&quot;,{params:c,action:a.action,records:a.records,operation:a,url:a.url});b.url=this.buildUrl(b);a.request=b;return b},processResponse:function(g,a,c,b,f,h){var e=this,d,i;if(g===true){d=e.getReader();i=d.read(e.extractResponseData(b));if(i.success!==false){Ext.apply(a,{response:b,resultSet:i});a.commitRecords(i.records);a.setCompleted();a.setSuccessful()}else{a.setException(i.message);e.fireEvent(&quot;exception&quot;,this,b,a)}}else{e.setException(a,b);e.fireEvent(&quot;exception&quot;,this,b,a)}if(typeof f==&quot;function&quot;){f.call(h||e,a)}e.afterRequest(c,g)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},extractResponseData:function(a){return a},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a&lt;c;a++){b[a]={property:d[a].property,direction:d[a].direction}}return this.applyEncoding(b)},encodeFilters:function(d){var b=[],c=d.length,a=0;for(;a&lt;c;a++){b[a]={property:d[a].property,value:d[a].value}}return this.applyEncoding(b)},getParams:function(k){var r=this,q={},n=Ext.isDefined,o=k.groupers,a=k.sorters,i=k.filters,g=k.page,f=k.start,p=k.limit,h=r.simpleSortMode,m=r.pageParam,d=r.startParam,b=r.limitParam,c=r.groupParam,e=r.sortParam,l=r.filterParam,j=r.directionParam;if(m&amp;&amp;n(g)){q[m]=g}if(d&amp;&amp;n(f)){q[d]=f}if(b&amp;&amp;n(p)){q[b]=p}if(c&amp;&amp;o&amp;&amp;o.length&gt;0){q[c]=r.encodeSorters(o)}if(e&amp;&amp;a&amp;&amp;a.length&gt;0){if(h){q[e]=a[0].property;q[j]=a[0].direction}else{q[e]=r.encodeSorters(a)}}if(l&amp;&amp;i&amp;&amp;i.length&gt;0){q[l]=r.encodeFilters(i)}return q},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.noCache){a=Ext.urlAppend(a,Ext.String.format(&quot;{0}={1}&quot;,b.cacheString,Ext.Date.now()))}return a},getUrl:function(a){return a.url||this.api[a.action]||this.url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.reader,this.writer)}});Ext.define(&quot;Ext.data.proxy.Ajax&quot;,{requires:[&quot;Ext.util.MixedCollection&quot;,&quot;Ext.Ajax&quot;],extend:&quot;Ext.data.proxy.Server&quot;,alias:&quot;proxy.ajax&quot;,alternateClassName:[&quot;Ext.data.HttpProxy&quot;,&quot;Ext.data.AjaxProxy&quot;],actionMethods:{create:&quot;POST&quot;,read:&quot;GET&quot;,update:&quot;POST&quot;,destroy:&quot;POST&quot;},doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a,e,b);if(a.allowWrite()){c=d.write(c)}Ext.apply(c,{headers:this.headers,timeout:this.timeout,scope:this,callback:this.createRequestCallback(c,a,e,b),method:this.getMethod(c),disableCaching:false});Ext.Ajax.request(c);return c},getMethod:function(a){return this.actionMethods[a.action]},createRequestCallback:function(d,a,e,b){var c=this;return function(g,h,f){c.processResponse(h,a,d,f,e,b)}}},function(){Ext.data.HttpProxy=this});Ext.define(&quot;Ext.data.Model&quot;,{alternateClassName:&quot;Ext.data.Record&quot;,mixins:{observable:&quot;Ext.util.Observable&quot;},requires:[&quot;Ext.ModelManager&quot;,&quot;Ext.data.IdGenerator&quot;,&quot;Ext.data.Field&quot;,&quot;Ext.data.Errors&quot;,&quot;Ext.data.Operation&quot;,&quot;Ext.data.validations&quot;,&quot;Ext.data.proxy.Ajax&quot;,&quot;Ext.util.MixedCollection&quot;],onClassExtended:function(a,b){var c=b.onBeforeClassCreated;b.onBeforeClassCreated=function(d,x){var w=this,y=Ext.getClassName(d),l=d.prototype,q=d.prototype.superclass,e=x.validations||[],n=x.fields||[],s=x.associations||[],r=x.belongsTo,m=x.hasMany,o=x.idgen,u=new Ext.util.MixedCollection(false,function(i){return i.name}),t=new Ext.util.MixedCollection(false,function(i){return i.name}),k=q.validations,v=q.fields,g=q.associations,f,p,h,j=[];d.modelName=y;l.modelName=y;if(k){e=k.concat(e)}x.validations=e;if(v){n=v.items.concat(n)}for(p=0,h=n.length;p&lt;h;++p){u.add(new Ext.data.Field(n[p]))}x.fields=u;if(o){x.idgen=Ext.data.IdGenerator.get(o)}if(r){r=Ext.Array.from(r);for(p=0,h=r.length;p&lt;h;++p){f=r[p];if(!Ext.isObject(f)){f={model:f}}f.type=&quot;belongsTo&quot;;s.push(f)}delete x.belongsTo}if(m){m=Ext.Array.from(m);for(p=0,h=m.length;p&lt;h;++p){f=m[p];if(!Ext.isObject(f)){f={model:f}}f.type=&quot;hasMany&quot;;s.push(f)}delete x.hasMany}if(g){s=g.items.concat(s)}for(p=0,h=s.length;p&lt;h;++p){j.push(&quot;association.&quot;+s[p].type.toLowerCase())}if(x.proxy){if(typeof x.proxy===&quot;string&quot;){j.push(&quot;proxy.&quot;+x.proxy)}else{if(typeof x.proxy.type===&quot;string&quot;){j.push(&quot;proxy.&quot;+x.proxy.type)}}}Ext.require(j,function(){Ext.ModelManager.registerType(y,d);for(p=0,h=s.length;p&lt;h;++p){f=s[p];Ext.apply(f,{ownerModel:y,associatedModel:f.model});if(Ext.ModelManager.getModel(f.model)===undefined){Ext.ModelManager.registerDeferredAssociation(f)}else{t.add(Ext.data.Association.create(f))}}x.associations=t;c.call(w,d,x);d.setProxy(d.prototype.proxy||d.prototype.defaultProxyType);Ext.ModelManager.onModelDefined(d)})}},inheritableStatics:{setProxy:function(a){if(!a.isProxy){if(typeof a==&quot;string&quot;){a={type:a}}a=Ext.createByAlias(&quot;proxy.&quot;+a.type,a)}a.setModel(this);this.proxy=this.prototype.proxy=a;return a},getProxy:function(){return this.proxy},load:function(f,c){c=Ext.apply({},c);c=Ext.applyIf(c,{action:&quot;read&quot;,id:f});var b=Ext.create(&quot;Ext.data.Operation&quot;,c),d=c.scope||this,a=null,e;e=function(g){if(g.wasSuccessful()){a=g.getRecords()[0];Ext.callback(c.success,d,[a,g])}else{Ext.callback(c.failure,d,[a,g])}Ext.callback(c.callback,d,[a,g])};this.proxy.read(b,e,this)}},statics:{PREFIX:&quot;ext-record&quot;,AUTO_ID:1,EDIT:&quot;edit&quot;,REJECT:&quot;reject&quot;,COMMIT:&quot;commit&quot;,id:function(a){var b=[this.PREFIX,&quot;-&quot;,this.AUTO_ID++].join(&quot;&quot;);a.phantom=true;a.internalId=b;return b}},idgen:{isGenerator:true,type:&quot;default&quot;,generate:function(){return null},getRecId:function(a){return a.modelName+&quot;-&quot;+a.internalId}},editing:false,dirty:false,persistenceProperty:&quot;data&quot;,evented:false,isModel:true,phantom:false,idProperty:&quot;id&quot;,defaultProxyType:&quot;ajax&quot;,constructor:function(f,b,l){f=f||{};var j=this,h,c,k,a,e,d,g=Ext.isArray(f),m=g?{}:null;j.internalId=(b||b===0)?b:Ext.data.Model.id(j);j.raw=l;Ext.applyIf(j,{data:{}});j.modified={};if(j.persistanceProperty){j.persistenceProperty=j.persistanceProperty}j[j.persistenceProperty]={};j.mixins.observable.constructor.call(j);h=j.fields.items;c=h.length;for(e=0;e&lt;c;e++){k=h[e];a=k.name;if(g){m[a]=f[e]}else{if(f[a]===undefined){f[a]=k.defaultValue}}}j.set(m||f);if(j.getId()){j.phantom=false}else{if(j.phantom){d=j.idgen.generate();if(d!==null){j.setId(d)}}}j.dirty=false;j.modified={};if(typeof j.init==&quot;function&quot;){j.init()}j.id=j.idgen.getRecId(j)},get:function(a){return this[this.persistenceProperty][a]},set:function(n,j){var g=this,e=g.fields,m=g.modified,d=[],h,l,c,k,b,f,a;if(arguments.length==1&amp;&amp;Ext.isObject(n)){b=!g.editing;f=0;for(l in n){if(n.hasOwnProperty(l)){h=e.get(l);if(h&amp;&amp;h.convert!==h.type.convert){d.push(l);continue}if(!f&amp;&amp;b){g.beginEdit()}++f;g.set(l,n[l])}}a=d.length;if(a){if(!f&amp;&amp;b){g.beginEdit()}f+=a;for(c=0;c&lt;a;c++){h=d[c];g.set(h,n[h])}}if(b&amp;&amp;f){g.endEdit()}}else{if(e){h=e.get(n);if(h&amp;&amp;h.convert){j=h.convert(j,g)}}k=g.get(n);g[g.persistenceProperty][n]=j;if(h&amp;&amp;h.persist&amp;&amp;!g.isEqual(k,j)){if(g.isModified(n)){if(g.isEqual(m[n],j)){delete m[n];g.dirty=false;for(l in m){if(m.hasOwnProperty(l)){g.dirty=true;break}}}}else{g.dirty=true;m[n]=k}}if(!g.editing){g.afterEdit()}}},isEqual:function(d,c){if(Ext.isDate(d)&amp;&amp;Ext.isDate(c)){return d.getTime()===c.getTime()}return d===c},beginEdit:function(){var a=this;if(!a.editing){a.editing=true;a.dirtySave=a.dirty;a.dataSave=Ext.apply({},a[a.persistenceProperty]);a.modifiedSave=Ext.apply({},a.modified)}},cancelEdit:function(){var a=this;if(a.editing){a.editing=false;a.modified=a.modifiedSave;a[a.persistenceProperty]=a.dataSave;a.dirty=a.dirtySave;delete a.modifiedSave;delete a.dataSave;delete a.dirtySave}},endEdit:function(a){var b=this,c;if(b.editing){b.editing=false;c=b.dirty||b.changedWhileEditing();delete b.modifiedSave;delete b.dataSave;delete b.dirtySave;if(a!==true&amp;&amp;c){b.afterEdit()}}},changedWhileEditing:function(){var c=this,b=c.dataSave,d=c[c.persistenceProperty],a;for(a in d){if(d.hasOwnProperty(a)){if(!c.isEqual(d[a],b[a])){return true}}}return false},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},setDirty:function(){var b=this,a;b.dirty=true;b.fields.each(function(c){if(c.persist){a=c.name;b.modified[a]=b.get(a)}},b)},reject:function(a){var c=this,b=c.modified,d;for(d in b){if(b.hasOwnProperty(d)){if(typeof b[d]!=&quot;function&quot;){c[c.persistenceProperty][d]=b[d]}}}c.dirty=false;c.editing=false;c.modified={};if(a!==true){c.afterReject()}},commit:function(a){var b=this;b.phantom=b.dirty=b.editing=false;b.modified={};if(a!==true){b.afterCommit()}},copy:function(a){var b=this;return new b.self(Ext.apply({},b[b.persistenceProperty]),a||b.internalId)},setProxy:function(a){if(!a.isProxy){if(typeof a===&quot;string&quot;){a={type:a}}a=Ext.createByAlias(&quot;proxy.&quot;+a.type,a)}a.setModel(this.self);this.proxy=a;return a},getProxy:function(){return this.proxy},validate:function(){var j=Ext.create(&quot;Ext.data.Errors&quot;),c=this.validations,e=Ext.data.validations,b,d,h,a,g,f;if(c){b=c.length;for(f=0;f&lt;b;f++){d=c[f];h=d.field||d.name;g=d.type;a=e[g](d,this.get(h));if(!a){j.add({field:h,message:d.message||e[g+&quot;Message&quot;]})}}}return j},isValid:function(){return this.validate().isValid()},save:function(c){c=Ext.apply({},c);var e=this,f=e.phantom?&quot;create&quot;:&quot;update&quot;,a=null,d=c.scope||e,b,g;Ext.apply(c,{records:[e],action:f});b=Ext.create(&quot;Ext.data.Operation&quot;,c);g=function(h){if(h.wasSuccessful()){a=h.getRecords()[0];e.set(a.data);a.dirty=false;Ext.callback(c.success,d,[a,h])}else{Ext.callback(c.failure,d,[a,h])}Ext.callback(c.callback,d,[a,h])};e.getProxy()[f](b,g,e);return e},destroy:function(c){c=Ext.apply({},c);var e=this,a=null,d=c.scope||e,b,f;Ext.apply(c,{records:[e],action:&quot;destroy&quot;});b=Ext.create(&quot;Ext.data.Operation&quot;,c);f=function(g){if(g.wasSuccessful()){Ext.callback(c.success,d,[a,g])}else{Ext.callback(c.failure,d,[a,g])}Ext.callback(c.callback,d,[a,g])};e.getProxy().destroy(b,f,e);return e},getId:function(){return this.get(this.idProperty)},setId:function(a){this.set(this.idProperty,a)},join:function(a){this.store=a},unjoin:function(a){delete this.store},afterEdit:function(){this.callStore(&quot;afterEdit&quot;)},afterReject:function(){this.callStore(&quot;afterReject&quot;)},afterCommit:function(){this.callStore(&quot;afterCommit&quot;)},callStore:function(b){var a=this.store;if(a!==undefined&amp;&amp;typeof a[b]==&quot;function&quot;){a[b](this)}},getAssociatedData:function(){return this.prepareAssociatedData(this,[],null)},prepareAssociatedData:function(p,b,o){var k=p.associations.items,m=k.length,f={},g,a,h,r,s,e,d,n,l,q,c;for(n=0;n&lt;m;n++){e=k[n];q=e.type;c=true;if(o){c=q==o}if(c&amp;&amp;q==&quot;hasMany&quot;){g=p[e.storeName];f[e.name]=[];if(g&amp;&amp;g.data.length&gt;0){h=g.data.items;s=h.length;for(l=0;l&lt;s;l++){r=h[l];d=r.id;if(Ext.Array.indexOf(b,d)==-1){b.push(d);f[e.name][l]=r.data;Ext.apply(f[e.name][l],this.prepareAssociatedData(r,b,q))}}}}else{if(c&amp;&amp;q==&quot;belongsTo&quot;){r=p[e.instanceName];if(r!==undefined){d=r.id;if(Ext.Array.indexOf(b,d)==-1){b.push(d);f[e.name]=r.data;Ext.apply(f[e.name],this.prepareAssociatedData(r,b,q))}}}}}return f}});Ext.define(&quot;Ext.XTemplate&quot;,{extend:&quot;Ext.Template&quot;,argsRe:/&lt;tpl\b[^&gt;]*&gt;((?:(?=([^&lt;]+))\2|&lt;(?!tpl\b[^&gt;]*&gt;))*?)&lt;\/tpl&gt;/,nameRe:/^&lt;tpl\b[^&gt;]*?for=&quot;(.*?)&quot;/,ifRe:/^&lt;tpl\b[^&gt;]*?if=&quot;(.*?)&quot;/,execRe:/^&lt;tpl\b[^&gt;]*?exec=&quot;(.*?)&quot;/,constructor:function(){this.callParent(arguments);var x=this,h=x.html,u=x.argsRe,c=x.nameRe,s=x.ifRe,w=x.execRe,o=0,j=[],n=&quot;values&quot;,v=&quot;parent&quot;,k=&quot;xindex&quot;,l=&quot;xcount&quot;,d=&quot;return &quot;,b=&quot;with(values){ &quot;,p,f,t,a,e,g,q,y,r;h=[&quot;&lt;tpl&gt;&quot;,h,&quot;&lt;/tpl&gt;&quot;].join(&quot;&quot;);while((p=h.match(u))){e=null;g=null;q=null;f=p[0].match(c);t=p[0].match(s);a=p[0].match(w);e=t?t[1]:null;if(e){g=Ext.functionFactory(n,v,k,l,b+&quot;try{&quot;+d+Ext.String.htmlDecode(e)+&quot;;}catch(e){return;}}&quot;)}e=a?a[1]:null;if(e){q=Ext.functionFactory(n,v,k,l,b+Ext.String.htmlDecode(e)+&quot;;}&quot;)}y=f?f[1]:null;if(y){if(y===&quot;.&quot;){y=n}else{if(y===&quot;..&quot;){y=v}}y=Ext.functionFactory(n,v,&quot;try{&quot;+b+d+y+&quot;;}}catch(e){return;}&quot;)}j.push({id:o,target:y,exec:q,test:g,body:p[1]||&quot;&quot;});h=h.replace(p[0],&quot;{xtpl&quot;+o+&quot;}&quot;);o=o+1}for(r=j.length-1;r&gt;=0;--r){x.compileTpl(j[r])}x.master=j[j.length-1];x.tpls=j},applySubTemplate:function(g,a,c,e,f){var d=this,b=d.tpls[g];return b.compiled.call(d,a,c,e,f)},codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?\}/g,compileTpl:function(tpl){var fm=Ext.util.Format,me=this,useFormat=me.disableFormats!==true,body,bodyReturn,evaluatedFn;function fn(m,name,format,args,math){var v;if(name.substr(0,4)==&quot;xtpl&quot;){return&quot;',this.applySubTemplate(&quot;+name.substr(4)+&quot;, values, parent, xindex, xcount),'&quot;}if(name==&quot;.&quot;){v='Ext.Array.indexOf([&quot;string&quot;, &quot;number&quot;, &quot;boolean&quot;], typeof values) &gt; -1 || Ext.isDate(values) ? values : &quot;&quot;'}else{if(name==&quot;#&quot;){v=&quot;xindex&quot;}else{if(name.substr(0,7)==&quot;parent.&quot;){v=name}else{if(name.indexOf(&quot;.&quot;)!=-1){v=&quot;values.&quot;+name}else{v=&quot;values['&quot;+name+&quot;']&quot;}}}}if(math){v=&quot;(&quot;+v+math+&quot;)&quot;}if(format&amp;&amp;useFormat){args=args?&quot;,&quot;+args:&quot;&quot;;if(format.substr(0,5)!=&quot;this.&quot;){format=&quot;fm.&quot;+format+&quot;(&quot;}else{format=&quot;this.&quot;+format.substr(5)+&quot;(&quot;}}else{args=&quot;&quot;;format=&quot;(&quot;+v+&quot; === undefined ? '' : &quot;}return&quot;',&quot;+format+v+args+&quot;),'&quot;}function codeFn(m,code){return&quot;',(&quot;+code.replace(me.compileARe,&quot;'&quot;)+&quot;),'&quot;}bodyReturn=tpl.body.replace(me.compileBRe,&quot;\\n&quot;).replace(me.compileCRe,&quot;\\'&quot;).replace(me.re,fn).replace(me.codeRe,codeFn);body=&quot;evaluatedFn = function(values, parent, xindex, xcount){return ['&quot;+bodyReturn+&quot;'].join('');};&quot;;eval(body);tpl.compiled=function(values,parent,xindex,xcount){var vs,length,buffer,i;if(tpl.test&amp;&amp;!tpl.test.call(me,values,parent,xindex,xcount)){return&quot;&quot;}vs=tpl.target?tpl.target.call(me,values,parent):values;if(!vs){return&quot;&quot;}parent=tpl.target?values:parent;if(tpl.target&amp;&amp;Ext.isArray(vs)){buffer=[];length=vs.length;if(tpl.exec){for(i=0;i&lt;length;i++){buffer[buffer.length]=evaluatedFn.call(me,vs[i],parent,i+1,length);tpl.exec.call(me,vs[i],parent,i+1,length)}}else{for(i=0;i&lt;length;i++){buffer[buffer.length]=evaluatedFn.call(me,vs[i],parent,i+1,length)}}return buffer.join(&quot;&quot;)}if(tpl.exec){tpl.exec.call(me,vs,parent,xindex,xcount)}return evaluatedFn.call(me,vs,parent,xindex,xcount)};return this},applyTemplate:function(a){return this.master.compiled.call(this,a,{},1,1)},compile:function(){return this}},function(){this.createAlias(&quot;apply&quot;,&quot;applyTemplate&quot;)});Ext.ns(&quot;Ext.fx&quot;);Ext.require(&quot;Ext.fx.CubicBezier&quot;,function(){var e=Math,g=e.PI,d=e.pow,b=e.sin,f=e.sqrt,a=e.abs,c=1.70158;Ext.fx.Easing={};Ext.apply(Ext.fx.Easing,{linear:function(h){return h},ease:function(k){var h=0.07813-k/2,l=-0.25,m=f(0.0066+h*h),p=m-h,j=d(a(p),1/3)*(p&lt;0?-1:1),o=-m-h,i=d(a(o),1/3)*(o&lt;0?-1:1),r=j+i+0.25;return d(1-r,2)*3*r*0.1+(1-r)*3*r*r+r*r*r},easeIn:function(h){return d(h,1.7)},easeOut:function(h){return d(h,0.48)},easeInOut:function(p){var k=0.48-p/1.04,j=f(0.1734+k*k),h=j-k,o=d(a(h),1/3)*(h&lt;0?-1:1),m=-j-k,l=d(a(m),1/3)*(m&lt;0?-1:1),i=o+l+0.5;return(1-i)*3*i*i+i*i*i},backIn:function(h){return h*h*((c+1)*h-c)},backOut:function(h){h=h-1;return h*h*((c+1)*h+c)+1},elasticIn:function(j){if(j===0||j===1){return j}var i=0.3,h=i/4;return d(2,-10*j)*b((j-h)*(2*g)/i)+1},elasticOut:function(h){return 1-Ext.fx.Easing.elasticIn(1-h)},bounceIn:function(h){return 1-Ext.fx.Easing.bounceOut(1-h)},bounceOut:function(k){var i=7.5625,j=2.75,h;if(k&lt;(1/j)){h=i*k*k}else{if(k&lt;(2/j)){k-=(1.5/j);h=i*k*k+0.75}else{if(k&lt;(2.5/j)){k-=(2.25/j);h=i*k*k+0.9375}else{k-=(2.625/j);h=i*k*k+0.984375}}}return h}});Ext.apply(Ext.fx.Easing,{&quot;back-in&quot;:Ext.fx.Easing.backIn,&quot;back-out&quot;:Ext.fx.Easing.backOut,&quot;ease-in&quot;:Ext.fx.Easing.easeIn,&quot;ease-out&quot;:Ext.fx.Easing.easeOut,&quot;elastic-in&quot;:Ext.fx.Easing.elasticIn,&quot;elastic-out&quot;:Ext.fx.Easing.elasticIn,&quot;bounce-in&quot;:Ext.fx.Easing.bounceIn,&quot;bounce-out&quot;:Ext.fx.Easing.bounceOut,&quot;ease-in-out&quot;:Ext.fx.Easing.easeInOut})});Ext.define(&quot;Ext.FocusManager&quot;,{singleton:true,alternateClassName:&quot;Ext.FocusMgr&quot;,mixins:{observable:&quot;Ext.util.Observable&quot;},requires:[&quot;Ext.ComponentManager&quot;,&quot;Ext.ComponentQuery&quot;,&quot;Ext.util.HashMap&quot;,&quot;Ext.util.KeyNav&quot;],enabled:false,focusElementCls:Ext.baseCSSPrefix+&quot;focus-element&quot;,focusFrameCls:Ext.baseCSSPrefix+&quot;focus-frame&quot;,whitelist:[&quot;textfield&quot;],tabIndexWhitelist:[&quot;a&quot;,&quot;button&quot;,&quot;embed&quot;,&quot;frame&quot;,&quot;iframe&quot;,&quot;img&quot;,&quot;input&quot;,&quot;object&quot;,&quot;select&quot;,&quot;textarea&quot;],constructor:function(){var a=this,b=Ext.ComponentQuery;a.addEvents(&quot;beforecomponentfocus&quot;,&quot;componentfocus&quot;,&quot;disable&quot;,&quot;enable&quot;);a.keyNav=Ext.create(&quot;Ext.util.KeyNav&quot;,Ext.getDoc(),{disabled:true,scope:a,backspace:a.focusLast,enter:a.navigateIn,esc:a.navigateOut,tab:a.navigateSiblings});a.focusData={};a.subscribers=Ext.create(&quot;Ext.util.HashMap&quot;);a.focusChain={};Ext.apply(b.pseudos,{focusable:function(f){var d=f.length,h=[],g=0,j,e=function(c){return c&amp;&amp;c.focusable!==false&amp;&amp;b.is(c,&quot;[rendered]:not([destroying]):not([isDestroyed]):not([disabled]){isVisible(true)}{el &amp;&amp; c.el.dom &amp;&amp; c.el.isVisible()}&quot;)};for(;g&lt;d;g++){j=f[g];if(e(j)){h.push(j)}}return h},nextFocus:function(f,e,h){h=h||1;e=parseInt(e,10);var d=f.length,g=e+h,j;for(;g!=e;g+=h){if(g&gt;=d){g=0}else{if(g&lt;0){g=d-1}}j=f[g];if(b.is(j,&quot;:focusable&quot;)){return[j]}else{if(j.placeholder&amp;&amp;b.is(j.placeholder,&quot;:focusable&quot;)){return[j.placeholder]}}}return[]},prevFocus:function(d,c){return this.nextFocus(d,c,-1)},root:function(e){var d=e.length,g=[],f=0,h;for(;f&lt;d;f++){h=e[f];if(!h.ownerCt){g.push(h)}}return g}})},addXTypeToWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.addXTypeToWhitelist,a);return}if(!Ext.Array.contains(a.whitelist,b)){a.whitelist.push(b)}},clearComponent:function(a){clearTimeout(this.cmpFocusDelay);if(!a.isDestroyed){a.blur()}},disable:function(){var a=this;if(!a.enabled){return}delete a.options;a.enabled=false;Ext.ComponentManager.all.un(&quot;add&quot;,a.onComponentCreated,a);a.removeDOM();a.keyNav.disable();a.setFocusAll(false);a.fireEvent(&quot;disable&quot;,a)},enable:function(a){var b=this;if(a===true){a={focusFrame:true}}b.options=a=a||{};if(b.enabled){return}Ext.ComponentManager.all.on(&quot;add&quot;,b.onComponentCreated,b);b.initDOM(a);b.keyNav.enable();b.setFocusAll(true,a);b.focusEl.focus();delete b.focusedCmp;b.enabled=true;b.fireEvent(&quot;enable&quot;,b)},focusLast:function(b){var a=this;if(a.isWhitelisted(a.focusedCmp)){return true}if(a.previousFocusedCmp){a.previousFocusedCmp.focus()}},getRootComponents:function(){var a=this,c=Ext.ComponentQuery,b=c.query(&quot;:focusable:root:not([floating])&quot;),d=c.query(&quot;:focusable:root[floating]&quot;);d.sort(function(f,e){return f.el.getZIndex()&gt;e.el.getZIndex()});return d.concat(b)},initDOM:function(b){var c=this,d=&quot;&amp;#160&quot;,a=c.focusFrameCls;if(!Ext.isReady){Ext.onReady(c.initDOM,c);return}if(!c.focusEl){c.focusEl=Ext.getBody().createChild({tabIndex:&quot;-1&quot;,cls:c.focusElementCls,html:d})}if(!c.focusFrame&amp;&amp;b.focusFrame){c.focusFrame=Ext.getBody().createChild({cls:a,children:[{cls:a+&quot;-top&quot;},{cls:a+&quot;-bottom&quot;},{cls:a+&quot;-left&quot;},{cls:a+&quot;-right&quot;}],style:&quot;top: -100px; left: -100px;&quot;});c.focusFrame.setVisibilityMode(Ext.Element.DISPLAY);c.focusFrameWidth=2;c.focusFrame.hide().setLeftTop(0,0)}},isWhitelisted:function(a){return a&amp;&amp;Ext.Array.some(this.whitelist,function(b){return a.isXType(b)})},navigateIn:function(d){var b=this,a=b.focusedCmp,f,c;if(!a){f=b.getRootComponents();if(f.length){f[0].focus()}}else{c=Ext.ComponentQuery.query(&quot;&gt;:focusable&quot;,a)[0];if(c){c.focus()}else{if(Ext.isFunction(a.onClick)){d.button=0;a.onClick(d);a.focus()}}}},navigateOut:function(c){var b=this,a;if(!b.focusedCmp||!(a=b.focusedCmp.up(&quot;:focusable&quot;))){b.focusEl.focus()}else{a.focus()}return true},navigateSiblings:function(h,b,m){var i=this,a=b||i,n=h.getKey(),f=Ext.EventObject,j=h.shiftKey||n==f.LEFT||n==f.UP,c=n==f.LEFT||n==f.RIGHT||n==f.UP||n==f.DOWN,g=j?&quot;prev&quot;:&quot;next&quot;,l,d,k;k=(a.focusedCmp&amp;&amp;a.focusedCmp.comp)||a.focusedCmp;if(!k&amp;&amp;!m){return}if(c&amp;&amp;i.isWhitelisted(k)){return true}m=m||k.up();if(m){l=k?Ext.Array.indexOf(m.getRefItems(),k):-1;d=Ext.ComponentQuery.query(&quot;&gt;:&quot;+g+&quot;Focus(&quot;+l+&quot;)&quot;,m)[0];if(d&amp;&amp;k!==d){d.focus();return d}}},onComponentBlur:function(b,c){var a=this;if(a.focusedCmp===b){a.previousFocusedCmp=b;delete a.focusedCmp}if(a.focusFrame){a.focusFrame.hide()}},onComponentCreated:function(b,c,a){this.setFocus(a,true,this.options)},onComponentDestroy:function(a){this.setFocus(a,false)},onComponentFocus:function(n,k){var l=this,a=l.focusChain;if(!Ext.ComponentQuery.is(n,&quot;:focusable&quot;)){l.clearComponent(n);if(a[n.id]){return}var p=n.up();if(p){a[n.id]=true;p.focus()}return}l.focusChain={};clearTimeout(l.cmpFocusDelay);if(arguments.length!==2){l.cmpFocusDelay=Ext.defer(l.onComponentFocus,90,l,[n,k]);return}if(l.fireEvent(&quot;beforecomponentfocus&quot;,l,n,l.previousFocusedCmp)===false){l.clearComponent(n);return}l.focusedCmp=n;if(l.shouldShowFocusFrame(n)){var r=&quot;.&quot;+l.focusFrameCls+&quot;-&quot;,b=l.focusFrame,f=l.focusFrameWidth,i=n.el.getPageBox(),q=i.top,c=i.left,m=i.width,g=i.height,h=b.child(r+&quot;top&quot;),d=b.child(r+&quot;bottom&quot;),o=b.child(r+&quot;left&quot;),j=b.child(r+&quot;right&quot;);h.setWidth(m).setLeftTop(c,q);d.setWidth(m).setLeftTop(c,q+g-f);o.setHeight(g-f-f).setLeftTop(c,q+f);j.setHeight(g-f-f).setLeftTop(c+m-f,q+f);b.show()}l.fireEvent(&quot;componentfocus&quot;,l,n,l.previousFocusedCmp)},onComponentHide:function(e){var d=this,f=Ext.ComponentQuery,b=false,a,c;if(d.focusedCmp){a=f.query(&quot;[id=&quot;+d.focusedCmp.id+&quot;]&quot;,e)[0];b=d.focusedCmp.id===e.id||a;if(a){d.clearComponent(a)}}d.clearComponent(e);if(b){c=f.query(&quot;^:focusable&quot;,e)[0];if(c){c.focus()}}},removeDOM:function(){var a=this;if(a.enabled||a.subscribers.length){return}Ext.destroy(a.focusEl,a.focusFrame);delete a.focusEl;delete a.focusFrame;delete a.focusFrameWidth},removeXTypeFromWhitelist:function(b){var a=this;if(Ext.isArray(b)){Ext.Array.forEach(b,a.removeXTypeFromWhitelist,a);return}Ext.Array.remove(a.whitelist,b)},setFocus:function(e,h,b){var d=this,c,g,f,a=function(i){return !Ext.Array.contains(d.tabIndexWhitelist,i.tagName.toLowerCase())&amp;&amp;i.tabIndex&lt;=0};b=b||{};if(!e.rendered){e.on(&quot;afterrender&quot;,Ext.pass(d.setFocus,arguments,d),d,{single:true});return}c=e.getFocusEl();g=c.dom;if((h&amp;&amp;!d.focusData[e.id])||(!h&amp;&amp;d.focusData[e.id])){if(h){f={focusFrame:b.focusFrame};if(a(g)){f.tabIndex=g.tabIndex;g.tabIndex=-1}c.on({focus:f.focusFn=Ext.bind(d.onComponentFocus,d,[e],0),blur:f.blurFn=Ext.bind(d.onComponentBlur,d,[e],0),scope:d});e.on({hide:d.onComponentHide,close:d.onComponentHide,beforedestroy:d.onComponentDestroy,scope:d});d.focusData[e.id]=f}else{f=d.focusData[e.id];if(&quot;tabIndex&quot; in f){g.tabIndex=f.tabIndex}c.un(&quot;focus&quot;,f.focusFn,d);c.un(&quot;blur&quot;,f.blurFn,d);e.un(&quot;hide&quot;,d.onComponentHide,d);e.un(&quot;close&quot;,d.onComponentHide,d);e.un(&quot;beforedestroy&quot;,d.onComponentDestroy,d);delete d.focusData[e.id]}}},setFocusAll:function(g,c){var f=this,b=Ext.ComponentManager.all.getArray(),a=b.length,e,d=0;for(;d&lt;a;d++){f.setFocus(b[d],g,c)}},setupSubscriberKeys:function(a,f){var e=this,d=a.getFocusEl(),c=f.scope,b={backspace:e.focusLast,enter:e.navigateIn,esc:e.navigateOut,scope:e},g=function(h){if(e.focusedCmp===a){return e.navigateSiblings(h,e,a)}else{return e.navigateSiblings(h)}};Ext.iterate(f,function(i,h){b[i]=function(k){var j=g(k);if(Ext.isFunction(h)&amp;&amp;h.call(c||a,k,j)===true){return true}return j}},e);return Ext.create(&quot;Ext.util.KeyNav&quot;,d,b)},shouldShowFocusFrame:function(c){var b=this,a=b.options||{};if(!b.focusFrame||!c){return false}if(a.focusFrame){return true}if(b.focusData[c.id].focusFrame){return true}return false},subscribe:function(a,c){var f=this,e=Ext.Array,g={},d=f.subscribers,b=function(h){if(h.isContainer&amp;&amp;!d.containsKey(h.id)){e.forEach(h.query(&quot;&gt;&quot;),b);f.setFocus(h,true,c);h.on(&quot;add&quot;,g.onAdd,f)}else{if(!h.isContainer){f.setFocus(h,true,c)}}};if(!a||!a.isContainer){return}if(!a.rendered){a.on(&quot;afterrender&quot;,Ext.pass(f.subscribe,arguments,f),f,{single:true});return}f.initDOM(c);g.keyNav=f.setupSubscriberKeys(a,c.keys);g.onAdd=function(i,j,h){b(j)};a.on(&quot;beforedestroy&quot;,f.unsubscribe,f);b(a);d.add(a.id,g)},unsubscribe:function(a){var e=this,d=Ext.Array,c=e.subscribers,f,b=function(g){if(g.isContainer&amp;&amp;!c.containsKey(g.id)){d.forEach(g.query(&quot;&gt;&quot;),b);e.setFocus(g,false);g.un(&quot;add&quot;,f.onAdd,e)}else{if(!g.isContainer){e.setFocus(g,false)}}};if(!a||!c.containsKey(a.id)){return}f=c.get(a.id);f.keyNav.destroy();a.un(&quot;beforedestroy&quot;,e.unsubscribe,e);c.removeAtKey(a.id);b(a);e.removeDOM()}});Ext.define(&quot;Ext.fx.target.Element&quot;,{extend:&quot;Ext.fx.target.Target&quot;,type:&quot;element&quot;,getElVal:function(b,a,c){if(c==undefined){if(a===&quot;x&quot;){c=b.getX()}else{if(a===&quot;y&quot;){c=b.getY()}else{if(a===&quot;scrollTop&quot;){c=b.getScroll().top}else{if(a===&quot;scrollLeft&quot;){c=b.getScroll().left}else{if(a===&quot;height&quot;){c=b.getHeight()}else{if(a===&quot;width&quot;){c=b.getWidth()}else{c=b.getStyle(a)}}}}}}}return c},getAttr:function(a,c){var b=this.target;return[[b,this.getElVal(b,a,c)]]},setAttr:function(k){var f=this.target,h=k.length,m,g,b,e,c,a,d,l;for(e=0;e&lt;h;e++){m=k[e].attrs;for(g in m){if(m.hasOwnProperty(g)){a=m[g].length;for(c=0;c&lt;a;c++){b=m[g][c];d=b[0];l=b[1];if(g===&quot;x&quot;){d.setX(l)}else{if(g===&quot;y&quot;){d.setY(l)}else{if(g===&quot;scrollTop&quot;){d.scrollTo(&quot;top&quot;,l)}else{if(g===&quot;scrollLeft&quot;){d.scrollTo(&quot;left&quot;,l)}else{d.setStyle(g,l)}}}}}}}}}});Ext.define(&quot;Ext.fx.target.CompositeElement&quot;,{extend:&quot;Ext.fx.target.Element&quot;,isComposite:true,constructor:function(a){a.id=a.id||Ext.id(null,&quot;ext-composite-&quot;);this.callParent([a])},getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,this.getElVal(e,a,d)])},this);return b}});Ext.define(&quot;Ext.fx.target.Sprite&quot;,{extend:&quot;Ext.fx.target.Target&quot;,type:&quot;draw&quot;,getFromPrim:function(b,a){var c;if(a==&quot;translate&quot;){c={x:b.attr.translation.x||0,y:b.attr.translation.y||0}}else{if(a==&quot;rotate&quot;){c={degrees:b.attr.rotation.degrees||0,x:b.attr.rotation.x,y:b.attr.rotation.y}}else{c=b.attr[a]}}return c},getAttr:function(a,b){return[[this.target,b!=undefined?b:this.getFromPrim(this.target,a)]]},setAttr:function(m){var g=m.length,k=[],q,f,p,e,b,o,n,d,c,l,h,a;for(d=0;d&lt;g;d++){q=m[d].attrs;for(f in q){p=q[f];a=p.length;for(c=0;c&lt;a;c++){b=p[c][0];e=p[c][1];if(f===&quot;translate&quot;){n={x:e.x,y:e.y}}else{if(f===&quot;rotate&quot;){l=e.x;if(isNaN(l)){l=null}h=e.y;if(isNaN(h)){h=null}n={degrees:e.degrees,x:l,y:h}}else{if(f===&quot;width&quot;||f===&quot;height&quot;||f===&quot;x&quot;||f===&quot;y&quot;){n=parseFloat(e)}else{n=e}}}o=Ext.Array.indexOf(k,b);if(o==-1){k.push([b,{}]);o=k.length-1}k[o][1][f]=n}}}g=k.length;for(d=0;d&lt;g;d++){b=k[d];b[0].setAttributes(b[1])}this.target.redraw()}});Ext.define(&quot;Ext.fx.target.CompositeSprite&quot;,{extend:&quot;Ext.fx.target.Sprite&quot;,getAttr:function(a,d){var b=[],c=this.target;c.each(function(e){b.push([e,d!=undefined?d:this.getFromPrim(e,a)])},this);return b}});Ext.define(&quot;Ext.fx.target.Component&quot;,{extend:&quot;Ext.fx.target.Target&quot;,type:&quot;component&quot;,getPropMethod:{top:function(){return this.getPosition(true)[1]},left:function(){return this.getPosition(true)[0]},x:function(){return this.getPosition()[0]},y:function(){return this.getPosition()[1]},height:function(){return this.getHeight()},width:function(){return this.getWidth()},opacity:function(){return this.el.getStyle(&quot;opacity&quot;)}},compMethod:{top:&quot;setPosition&quot;,left:&quot;setPosition&quot;,x:&quot;setPagePosition&quot;,y:&quot;setPagePosition&quot;,height:&quot;setSize&quot;,width:&quot;setSize&quot;,opacity:&quot;setOpacity&quot;},getAttr:function(a,b){return[[this.target,b!==undefined?b:this.getPropMethod[a].call(this.target)]]},setAttr:function(s,e,b){var q=this,l=q.target,p=s.length,u,m,a,f,d,n,k,c,r,t,g;for(f=0;f&lt;p;f++){u=s[f].attrs;for(m in u){k=u[m].length;n={setPosition:{},setPagePosition:{},setSize:{},setOpacity:{}};for(d=0;d&lt;k;d++){a=u[m][d];n[q.compMethod[m]].target=a[0];n[q.compMethod[m]][m]=a[1]}if(n.setPosition.target){a=n.setPosition;c=(a.left===undefined)?undefined:parseInt(a.left,10);r=(a.top===undefined)?undefined:parseInt(a.top,10);a.target.setPosition(c,r)}if(n.setPagePosition.target){a=n.setPagePosition;a.target.setPagePosition(a.x,a.y)}if(n.setSize.target&amp;&amp;n.setSize.target.el){a=n.setSize;t=(a.width===undefined)?a.target.getWidth():parseInt(a.width,10);g=(a.height===undefined)?a.target.getHeight():parseInt(a.height,10);if(b||q.dynamic){a.target.componentLayout.childrenChanged=true;if(q.layoutAnimation){a.target.setCalculatedSize(t,g)}else{a.target.setSize(t,g)}}else{a.target.el.setSize(t,g)}}if(n.setOpacity.target){a=n.setOpacity;a.target.el.setStyle(&quot;opacity&quot;,a.opacity)}}}}});Ext.define(&quot;Ext.fx.Manager&quot;,{singleton:true,requires:[&quot;Ext.util.MixedCollection&quot;,&quot;Ext.fx.target.Element&quot;,&quot;Ext.fx.target.CompositeElement&quot;,&quot;Ext.fx.target.Sprite&quot;,&quot;Ext.fx.target.CompositeSprite&quot;,&quot;Ext.fx.target.Component&quot;],mixins:{queue:&quot;Ext.fx.Queue&quot;},constructor:function(){this.items=Ext.create(&quot;Ext.util.MixedCollection&quot;);this.mixins.queue.constructor.call(this)},interval:16,forceJS:true,createTarget:function(d){var b=this,c=!b.forceJS&amp;&amp;Ext.supports.Transitions,a;b.useCSS3=c;if(Ext.isString(d)){d=Ext.get(d)}if(d&amp;&amp;d.tagName){d=Ext.get(d);a=Ext.create(&quot;Ext.fx.target.Element&quot;+(c?&quot;CSS&quot;:&quot;&quot;),d);b.targets.add(a);return a}if(Ext.isObject(d)){if(d.dom){a=Ext.create(&quot;Ext.fx.target.Element&quot;+(c?&quot;CSS&quot;:&quot;&quot;),d)}else{if(d.isComposite){a=Ext.create(&quot;Ext.fx.target.CompositeElement&quot;+(c?&quot;CSS&quot;:&quot;&quot;),d)}else{if(d.isSprite){a=Ext.create(&quot;Ext.fx.target.Sprite&quot;,d)}else{if(d.isCompositeSprite){a=Ext.create(&quot;Ext.fx.target.CompositeSprite&quot;,d)}else{if(d.isComponent){a=Ext.create(&quot;Ext.fx.target.Component&quot;,d)}else{if(d.isAnimTarget){return d}else{return null}}}}}}b.targets.add(a);return a}else{return null}},addAnim:function(c){var b=this.items,a=this.task;b.add(c);if(!a&amp;&amp;b.length){a=this.task={run:this.runner,interval:this.interval,scope:this};Ext.TaskManager.start(a)}},removeAnim:function(c){var b=this.items,a=this.task;b.remove(c);if(a&amp;&amp;!b.length){Ext.TaskManager.stop(a);delete this.task}},startingFilter:function(a){return a.paused===false&amp;&amp;a.running===false&amp;&amp;a.iterations&gt;0},runningFilter:function(a){return a.paused===false&amp;&amp;a.running===true&amp;&amp;a.isAnimator!==true},runner:function(){var b=this,a=b.items;b.targetData={};b.targetArr={};b.timestamp=new Date();a.filterBy(b.startingFilter).each(b.startAnim,b);a.filterBy(b.runningFilter).each(b.runAnim,b);b.applyPendingAttrs()},startAnim:function(a){a.start(this.timestamp)},runAnim:function(d){if(!d){return}var c=this,b=d.target.getId(),f=c.useCSS3&amp;&amp;d.target.type==&quot;element&quot;,a=c.timestamp-d.startTime,e,g;this.collectTargetData(d,a,f);if(f){d.target.setAttr(c.targetData[b],true);c.targetData[b]=[];c.collectTargetData(d,d.duration,f);d.paused=true;e=d.target.target;if(d.target.isComposite){e=d.target.target.last()}g={};g[Ext.supports.CSS3TransitionEnd]=d.lastFrame;g.scope=d;g.single=true;e.on(g)}else{if(a&gt;=d.duration){c.applyPendingAttrs(true);delete c.targetData[b];delete c.targetArr[b];d.lastFrame()}}},collectTargetData:function(d,a,e){var b=d.target.getId(),f=this.targetData[b],c;if(!f){f=this.targetData[b]=[];this.targetArr[b]=d.target}c={duration:d.duration,easing:(e&amp;&amp;d.reverse)?d.easingFn.reverse().toCSS3():d.easing,attrs:{}};Ext.apply(c.attrs,d.runAnim(a));f.push(c)},applyPendingAttrs:function(d){var c=this.targetData,b=this.targetArr,a;for(a in c){if(c.hasOwnProperty(a)){b[a].setAttr(c[a],false,d)}}}});Ext.define(&quot;Ext.fx.Animator&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},requires:[&quot;Ext.fx.Manager&quot;],isAnimator:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:&quot;ease&quot;,running:false,paused:false,damper:1,iterations:1,currentIteration:0,keyframeStep:0,animKeyFramesRE:/^(from|to|\d+%?)$/,constructor:function(a){var b=this;a=Ext.apply(b,a||{});b.config=a;b.id=Ext.id(null,&quot;ext-animator-&quot;);b.addEvents(&quot;beforeanimate&quot;,&quot;keyframe&quot;,&quot;afteranimate&quot;);b.mixins.observable.constructor.call(b,a);b.timeline=[];b.createTimeline(b.keyframes);if(b.target){b.applyAnimator(b.target);Ext.fx.Manager.addAnim(b)}},sorter:function(d,c){return d.pct-c.pct},createTimeline:function(f){var j=this,m=[],k=j.to||{},c=j.duration,n,a,e,h,l,b,d,g;for(l in f){if(f.hasOwnProperty(l)&amp;&amp;j.animKeyFramesRE.test(l)){g={attrs:Ext.apply(f[l],k)};if(l==&quot;from&quot;){l=0}else{if(l==&quot;to&quot;){l=100}}g.pct=parseInt(l,10);m.push(g)}}Ext.Array.sort(m,j.sorter);h=m.length;for(e=0;e&lt;h;e++){n=(m[e-1])?c*(m[e-1].pct/100):0;a=c*(m[e].pct/100);j.timeline.push({duration:a-n,attrs:m[e].attrs})}},applyAnimator:function(e){var j=this,k=[],n=j.timeline,f=j.reverse,h=n.length,b,g,a,d,m,l,c;if(j.fireEvent(&quot;beforeanimate&quot;,j)!==false){for(c=0;c&lt;h;c++){b=n[c];m=b.attrs;g=m.easing||j.easing;a=m.damper||j.damper;delete m.easing;delete m.damper;b=Ext.create(&quot;Ext.fx.Anim&quot;,{target:e,easing:g,damper:a,duration:b.duration,paused:true,to:m});k.push(b)}j.animations=k;j.target=b.target;for(c=0;c&lt;h-1;c++){b=k[c];b.nextAnim=k[c+1];b.on(&quot;afteranimate&quot;,function(){this.nextAnim.paused=false});b.on(&quot;afteranimate&quot;,function(){this.fireEvent(&quot;keyframe&quot;,this,++this.keyframeStep)},j)}k[h-1].on(&quot;afteranimate&quot;,function(){this.lastFrame()},j)}},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a&lt;c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent(&quot;beforeanimate&quot;,e)!==false){e.startTime=d;e.running=true;e.animations[e.keyframeStep].paused=false}},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b&lt;a){c.startTime=new Date();c.currentIteration=b;c.keyframeStep=0;c.applyAnimator(c.target);c.animations[c.keyframeStep].paused=false}else{c.currentIteration=0;c.end()}},end:function(){var a=this;a.fireEvent(&quot;afteranimate&quot;,a,a.startTime,new Date()-a.startTime)}});Ext.define(&quot;Ext.draw.Draw&quot;,{singleton:true,requires:[&quot;Ext.draw.Color&quot;],pathToStringRE:/,?([achlmqrstvxz]),?/gi,pathCommandRE:/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,pathValuesRE:/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,stopsRE:/^(\d+%?)$/,radian:Math.PI/180,availableAnimAttrs:{along:&quot;along&quot;,blur:null,&quot;clip-rect&quot;:&quot;csv&quot;,cx:null,cy:null,fill:&quot;color&quot;,&quot;fill-opacity&quot;:null,&quot;font-size&quot;:null,height:null,opacity:null,path:&quot;path&quot;,r:null,rotation:&quot;csv&quot;,rx:null,ry:null,scale:&quot;csv&quot;,stroke:&quot;color&quot;,&quot;stroke-opacity&quot;:null,&quot;stroke-width&quot;:null,translation:&quot;csv&quot;,width:null,x:null,y:null},is:function(b,a){a=String(a).toLowerCase();return(a==&quot;object&quot;&amp;&amp;b===Object(b))||(a==&quot;undefined&quot;&amp;&amp;typeof b==a)||(a==&quot;null&quot;&amp;&amp;b===null)||(a==&quot;array&quot;&amp;&amp;Array.isArray&amp;&amp;Array.isArray(b))||(Object.prototype.toString.call(b).toLowerCase().slice(8,-1))==a},ellipsePath:function(b){var a=b.attr;return Ext.String.format(&quot;M{0},{1}A{2},{3},0,1,1,{0},{4}A{2},{3},0,1,1,{0},{1}z&quot;,a.x,a.y-a.ry,a.rx,a.ry,a.y+a.ry)},rectPath:function(b){var a=b.attr;if(a.radius){return Ext.String.format(&quot;M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z&quot;,a.x+a.radius,a.y,a.width-a.radius*2,a.radius,-a.radius,a.height-a.radius*2,a.radius*2-a.width,a.radius*2-a.height)}else{return Ext.String.format(&quot;M{0},{1}l{2},0,0,{3},{4},0z&quot;,a.x,a.y,a.width,a.height,-a.width)}},path2string:function(){return this.join(&quot;,&quot;).replace(Ext.draw.Draw.pathToStringRE,&quot;$1&quot;)},pathToString:function(a){return a.join(&quot;,&quot;).replace(Ext.draw.Draw.pathToStringRE,&quot;$1&quot;)},parsePathString:function(a){if(!a){return null}var d={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[],b=this;if(b.is(a,&quot;array&quot;)&amp;&amp;b.is(a[0],&quot;array&quot;)){c=b.pathClone(a)}if(!c.length){String(a).replace(b.pathCommandRE,function(f,e,i){var h=[],g=e.toLowerCase();i.replace(b.pathValuesRE,function(k,j){j&amp;&amp;h.push(+j)});if(g==&quot;m&quot;&amp;&amp;h.length&gt;2){c.push([e].concat(Ext.Array.splice(h,0,2)));g=&quot;l&quot;;e=(e==&quot;m&quot;)?&quot;l&quot;:&quot;L&quot;}while(h.length&gt;=d[g]){c.push([e].concat(Ext.Array.splice(h,0,d[g])));if(!d[g]){break}}})}c.toString=b.path2string;return c},mapPath:function(k,f){if(!f){return k}var g,e,c,h,a,d,b;k=this.path2curve(k);for(c=0,h=k.length;c&lt;h;c++){b=k[c];for(a=1,d=b.length;a&lt;d-1;a+=2){g=f.x(b[a],b[a+1]);e=f.y(b[a],b[a+1]);b[a]=g;b[a+1]=e}}return k},pathClone:function(f){var c=[],a,e,b,d;if(!this.is(f,&quot;array&quot;)||!this.is(f&amp;&amp;f[0],&quot;array&quot;)){f=this.parsePathString(f)}for(b=0,d=f.length;b&lt;d;b++){c[b]=[];for(a=0,e=f[b].length;a&lt;e;a++){c[b][a]=f[b][a]}}c.toString=this.path2string;return c},pathToAbsolute:function(c){if(!this.is(c,&quot;array&quot;)||!this.is(c&amp;&amp;c[0],&quot;array&quot;)){c=this.parsePathString(c)}var h=[],l=0,k=0,n=0,m=0,f=0,g=c.length,b,d,e,a;if(g&amp;&amp;c[0][0]==&quot;M&quot;){l=+c[0][1];k=+c[0][2];n=l;m=k;f++;h[0]=[&quot;M&quot;,l,k]}for(;f&lt;g;f++){b=h[f]=[];d=c[f];if(d[0]!=d[0].toUpperCase()){b[0]=d[0].toUpperCase();switch(b[0]){case&quot;A&quot;:b[1]=d[1];b[2]=d[2];b[3]=d[3];b[4]=d[4];b[5]=d[5];b[6]=+(d[6]+l);b[7]=+(d[7]+k);break;case&quot;V&quot;:b[1]=+d[1]+k;break;case&quot;H&quot;:b[1]=+d[1]+l;break;case&quot;M&quot;:n=+d[1]+l;m=+d[2]+k;default:e=1;a=d.length;for(;e&lt;a;e++){b[e]=+d[e]+((e%2)?l:k)}}}else{e=0;a=d.length;for(;e&lt;a;e++){h[f][e]=d[e]}}switch(b[0]){case&quot;Z&quot;:l=n;k=m;break;case&quot;H&quot;:l=b[1];break;case&quot;V&quot;:k=b[1];break;case&quot;M&quot;:d=h[f];a=d.length;n=d[a-2];m=d[a-1];default:d=h[f];a=d.length;l=d[a-2];k=d[a-1]}}h.toString=this.path2string;return h},pathToRelative:function(d){if(!this.is(d,&quot;array&quot;)||!this.is(d&amp;&amp;d[0],&quot;array&quot;)){d=this.parsePathString(d)}var m=[],o=0,n=0,s=0,q=0,c=0;if(d[0][0]==&quot;M&quot;){o=d[0][1];n=d[0][2];s=o;q=n;c++;m.push([&quot;M&quot;,o,n])}for(var g=c,t=d.length;g&lt;t;g++){var a=m[g]=[],p=d[g];if(p[0]!=p[0].toLowerCase()){a[0]=p[0].toLowerCase();switch(a[0]){case&quot;a&quot;:a[1]=p[1];a[2]=p[2];a[3]=p[3];a[4]=p[4];a[5]=p[5];a[6]=+(p[6]-o).toFixed(3);a[7]=+(p[7]-n).toFixed(3);break;case&quot;v&quot;:a[1]=+(p[1]-n).toFixed(3);break;case&quot;m&quot;:s=p[1];q=p[2];default:for(var f=1,h=p.length;f&lt;h;f++){a[f]=+(p[f]-((f%2)?o:n)).toFixed(3)}}}else{a=m[g]=[];if(p[0]==&quot;m&quot;){s=p[1]+o;q=p[2]+n}for(var e=0,b=p.length;e&lt;b;e++){m[g][e]=p[e]}}var l=m[g].length;switch(m[g][0]){case&quot;z&quot;:o=s;n=q;break;case&quot;h&quot;:o+=+m[g][l-1];break;case&quot;v&quot;:n+=+m[g][l-1];break;default:o+=+m[g][l-2];n+=+m[g][l-1]}}m.toString=this.path2string;return m},path2curve:function(j){var d=this,g=d.pathToAbsolute(j),c=g.length,h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b,a,f,e;for(b=0;b&lt;c;b++){g[b]=d.command2curve(g[b],h);if(g[b].length&gt;7){g[b].shift();e=g[b];while(e.length){Ext.Array.splice(g,b++,0,[&quot;C&quot;].concat(Ext.Array.splice(e,0,6)))}Ext.Array.erase(g,b,1);c=g.length}a=g[b];f=a.length;h.x=a[f-2];h.y=a[f-1];h.bx=parseFloat(a[f-4])||h.x;h.by=parseFloat(a[f-3])||h.y}return g},interpolatePaths:function(q,k){var h=this,d=h.pathToAbsolute(q),l=h.pathToAbsolute(k),m={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b=function(p,r){if(p[r].length&gt;7){p[r].shift();var s=p[r];while(s.length){Ext.Array.splice(p,r++,0,[&quot;C&quot;].concat(Ext.Array.splice(s,0,6)))}Ext.Array.erase(p,r,1);n=Math.max(d.length,l.length||0)}},c=function(u,t,r,p,s){if(u&amp;&amp;t&amp;&amp;u[s][0]==&quot;M&quot;&amp;&amp;t[s][0]!=&quot;M&quot;){Ext.Array.splice(t,s,0,[&quot;M&quot;,p.x,p.y]);r.bx=0;r.by=0;r.x=u[s][1];r.y=u[s][2];n=Math.max(d.length,l.length||0)}};for(var g=0,n=Math.max(d.length,l.length||0);g&lt;n;g++){d[g]=h.command2curve(d[g],m);b(d,g);(l[g]=h.command2curve(l[g],a));b(l,g);c(d,l,m,a,g);c(l,d,a,m,g);var f=d[g],o=l[g],e=f.length,j=o.length;m.x=f[e-2];m.y=f[e-1];m.bx=parseFloat(f[e-4])||m.x;m.by=parseFloat(f[e-3])||m.y;a.bx=(parseFloat(o[j-4])||a.x);a.by=(parseFloat(o[j-3])||a.y);a.x=o[j-2];a.y=o[j-1]}return[d,l]},command2curve:function(c,b){var a=this;if(!c){return[&quot;C&quot;,b.x,b.y,b.x,b.y,b.x,b.y]}if(c[0]!=&quot;T&quot;&amp;&amp;c[0]!=&quot;Q&quot;){b.qx=b.qy=null}switch(c[0]){case&quot;M&quot;:b.X=c[1];b.Y=c[2];break;case&quot;A&quot;:c=[&quot;C&quot;].concat(a.arc2curve.apply(a,[b.x,b.y].concat(c.slice(1))));break;case&quot;S&quot;:c=[&quot;C&quot;,b.x+(b.x-(b.bx||b.x)),b.y+(b.y-(b.by||b.y))].concat(c.slice(1));break;case&quot;T&quot;:b.qx=b.x+(b.x-(b.qx||b.x));b.qy=b.y+(b.y-(b.qy||b.y));c=[&quot;C&quot;].concat(a.quadratic2curve(b.x,b.y,b.qx,b.qy,c[1],c[2]));break;case&quot;Q&quot;:b.qx=c[1];b.qy=c[2];c=[&quot;C&quot;].concat(a.quadratic2curve(b.x,b.y,c[1],c[2],c[3],c[4]));break;case&quot;L&quot;:c=[&quot;C&quot;].concat(b.x,b.y,c[1],c[2],c[1],c[2]);break;case&quot;H&quot;:c=[&quot;C&quot;].concat(b.x,b.y,c[1],b.y,c[1],b.y);break;case&quot;V&quot;:c=[&quot;C&quot;].concat(b.x,b.y,b.x,c[1],b.x,c[1]);break;case&quot;Z&quot;:c=[&quot;C&quot;].concat(b.x,b.y,b.X,b.Y,b.X,b.Y);break}return c},quadratic2curve:function(b,d,g,e,a,c){var f=1/3,h=2/3;return[f*b+h*g,f*d+h*e,f*a+h*g,f*c+h*e,a,c]},rotate:function(b,g,a){var d=Math.cos(a),c=Math.sin(a),f=b*d-g*c,e=b*c+g*d;return{x:f,y:e}},arc2curve:function(u,ag,I,G,A,n,g,s,af,B){var w=this,e=Math.PI,z=w.radian,F=e*120/180,b=z*(+A||0),N=[],K=Math,U=K.cos,a=K.sin,W=K.sqrt,v=K.abs,o=K.asin,J,c,q,P,O,ab,d,S,V,D,C,m,l,r,j,ae,f,ad,Q,T,R,ac,aa,Z,X,M,Y,L,E,H,p;if(!B){J=w.rotate(u,ag,-b);u=J.x;ag=J.y;J=w.rotate(s,af,-b);s=J.x;af=J.y;c=U(z*A);q=a(z*A);P=(u-s)/2;O=(ag-af)/2;ab=(P*P)/(I*I)+(O*O)/(G*G);if(ab&gt;1){ab=W(ab);I=ab*I;G=ab*G}d=I*I;S=G*G;V=(n==g?-1:1)*W(v((d*S-d*O*O-S*P*P)/(d*O*O+S*P*P)));D=V*I*O/G+(u+s)/2;C=V*-G*P/I+(ag+af)/2;m=o(((ag-C)/G).toFixed(7));l=o(((af-C)/G).toFixed(7));m=u&lt;D?e-m:m;l=s&lt;D?e-l:l;if(m&lt;0){m=e*2+m}if(l&lt;0){l=e*2+l}if(g&amp;&amp;m&gt;l){m=m-e*2}if(!g&amp;&amp;l&gt;m){l=l-e*2}}else{m=B[0];l=B[1];D=B[2];C=B[3]}r=l-m;if(v(r)&gt;F){E=l;H=s;p=af;l=m+F*(g&amp;&amp;l&gt;m?1:-1);s=D+I*U(l);af=C+G*a(l);N=w.arc2curve(s,af,I,G,A,0,g,H,p,[l,E,D,C])}r=l-m;j=U(m);ae=a(m);f=U(l);ad=a(l);Q=K.tan(r/4);T=4/3*I*Q;R=4/3*G*Q;ac=[u,ag];aa=[u+T*ae,ag-R*j];Z=[s+T*ad,af-R*f];X=[s,af];aa[0]=2*ac[0]-aa[0];aa[1]=2*ac[1]-aa[1];if(B){return[aa,Z,X].concat(N)}else{N=[aa,Z,X].concat(N).join().split(&quot;,&quot;);M=[];L=N.length;for(Y=0;Y&lt;L;Y++){M[Y]=Y%2?w.rotate(N[Y-1],N[Y],b).y:w.rotate(N[Y],N[Y+1],b).x}return M}},rotateAndTranslatePath:function(h){var c=h.rotation.degrees,d=h.rotation.x,b=h.rotation.y,n=h.translation.x,k=h.translation.y,m,f,a,l,e,g=[];if(!c&amp;&amp;!n&amp;&amp;!k){return this.pathToAbsolute(h.attr.path)}n=n||0;k=k||0;m=this.pathToAbsolute(h.attr.path);for(f=m.length;f--;){a=g[f]=m[f].slice();if(a[0]==&quot;A&quot;){l=this.rotatePoint(a[6],a[7],c,d,b);a[6]=l.x+n;a[7]=l.y+k}else{e=1;while(a[e+1]!=null){l=this.rotatePoint(a[e],a[e+1],c,d,b);a[e]=l.x+n;a[e+1]=l.y+k;e+=2}}}return g},rotatePoint:function(b,g,e,a,f){if(!e){return{x:b,y:g}}a=a||0;f=f||0;b=b-a;g=g-f;e=e*this.radian;var d=Math.cos(e),c=Math.sin(e);return{x:b*d-g*c+a,y:b*c+g*d+f}},pathDimensions:function(l){if(!l||!(l+&quot;&quot;)){return{x:0,y:0,width:0,height:0}}l=this.path2curve(l);var j=0,h=0,d=[],b=[],e=0,g=l.length,c,a,k,f;for(;e&lt;g;e++){c=l[e];if(c[0]==&quot;M&quot;){j=c[1];h=c[2];d.push(j);b.push(h)}else{f=this.curveDim(j,h,c[1],c[2],c[3],c[4],c[5],c[6]);d=d.concat(f.min.x,f.max.x);b=b.concat(f.min.y,f.max.y);j=c[5];h=c[6]}}a=Math.min.apply(0,d);k=Math.min.apply(0,b);return{x:a,y:k,path:l,width:Math.max.apply(0,d)-a,height:Math.max.apply(0,b)-k}},intersectInside:function(b,c,a){return(a[0]-c[0])*(b[1]-c[1])&gt;(a[1]-c[1])*(b[0]-c[0])},intersectIntersection:function(m,l,f,d){var c=[],b=f[0]-d[0],a=f[1]-d[1],j=m[0]-l[0],h=m[1]-l[1],k=f[0]*d[1]-f[1]*d[0],i=m[0]*l[1]-m[1]*l[0],g=1/(b*h-a*j);c[0]=(k*j-i*b)*g;c[1]=(k*h-i*a)*g;return c},intersect:function(n,c){var m=this,h=0,l=c.length,g=c[l-1],p=n,f,q,k,o,a,b,d;for(;h&lt;l;++h){f=c[h];b=p;p=[];q=b[b.length-1];d=0;a=b.length;for(;d&lt;a;d++){k=b[d];if(m.intersectInside(k,g,f)){if(!m.intersectInside(q,g,f)){p.push(m.intersectIntersection(q,k,g,f))}p.push(k)}else{if(m.intersectInside(q,g,f)){p.push(m.intersectIntersection(q,k,g,f))}}q=k}g=f}return p},curveDim:function(f,d,h,g,s,r,o,l){var q=(s-2*h+f)-(o-2*s+h),n=2*(h-f)-2*(s-h),k=f-h,j=(-n+Math.sqrt(n*n-4*q*k))/2/q,i=(-n-Math.sqrt(n*n-4*q*k))/2/q,m=[d,l],p=[f,o],e;if(Math.abs(j)&gt;1000000000000){j=0.5}if(Math.abs(i)&gt;1000000000000){i=0.5}if(j&gt;0&amp;&amp;j&lt;1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,j);p.push(e.x);m.push(e.y)}if(i&gt;0&amp;&amp;i&lt;1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,i);p.push(e.x);m.push(e.y)}q=(r-2*g+d)-(l-2*r+g);n=2*(g-d)-2*(r-g);k=d-g;j=(-n+Math.sqrt(n*n-4*q*k))/2/q;i=(-n-Math.sqrt(n*n-4*q*k))/2/q;if(Math.abs(j)&gt;1000000000000){j=0.5}if(Math.abs(i)&gt;1000000000000){i=0.5}if(j&gt;0&amp;&amp;j&lt;1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,j);p.push(e.x);m.push(e.y)}if(i&gt;0&amp;&amp;i&lt;1){e=this.findDotAtSegment(f,d,h,g,s,r,o,l,i);p.push(e.x);m.push(e.y)}return{min:{x:Math.min.apply(0,p),y:Math.min.apply(0,m)},max:{x:Math.max.apply(0,p),y:Math.max.apply(0,m)}}},getAnchors:function(e,d,j,i,u,t,p){p=p||4;var h=Math,o=h.PI,q=o/2,l=h.abs,a=h.sin,b=h.cos,f=h.atan,s,r,g,k,n,m,w,v,c;s=(j-e)/p;r=(u-j)/p;if((i&gt;=d&amp;&amp;i&gt;=t)||(i&lt;=d&amp;&amp;i&lt;=t)){g=k=q}else{g=f((j-e)/l(i-d));if(d&lt;i){g=o-g}k=f((u-j)/l(i-t));if(t&lt;i){k=o-k}}c=q-((g+k)%(o*2))/2;if(c&gt;q){c-=o}g+=c;k+=c;n=j-s*a(g);m=i+s*b(g);w=j+r*a(k);v=i+r*b(k);if((i&gt;d&amp;&amp;m&lt;d)||(i&lt;d&amp;&amp;m&gt;d)){n+=l(d-m)*(n-j)/(m-i);m=d}if((i&gt;t&amp;&amp;v&lt;t)||(i&lt;t&amp;&amp;v&gt;t)){w-=l(t-v)*(w-j)/(v-i);v=t}return{x1:n,y1:m,x2:w,y2:v}},smooth:function(a,q){var p=this.path2curve(a),e=[p[0]],h=p[0][1],g=p[0][2],r,t,u=1,k=p.length,f=1,m=h,l=g,c=0,b=0;for(;u&lt;k;u++){var z=p[u],w=z.length,v=p[u-1],n=v.length,s=p[u+1],o=s&amp;&amp;s.length;if(z[0]==&quot;M&quot;){m=z[1];l=z[2];r=u+1;while(p[r][0]!=&quot;C&quot;){r++}c=p[r][5];b=p[r][6];e.push([&quot;M&quot;,m,l]);f=e.length;h=m;g=l;continue}if(z[w-2]==m&amp;&amp;z[w-1]==l&amp;&amp;(!s||s[0]==&quot;M&quot;)){var d=e[f].length;t=this.getAnchors(v[n-2],v[n-1],m,l,e[f][d-2],e[f][d-1],q);e[f][1]=t.x2;e[f][2]=t.y2}else{if(!s||s[0]==&quot;M&quot;){t={x1:z[w-2],y1:z[w-1]}}else{t=this.getAnchors(v[n-2],v[n-1],z[w-2],z[w-1],s[o-2],s[o-1],q)}}e.push([&quot;C&quot;,h,g,t.x1,t.y1,z[w-2],z[w-1]]);h=t.x2;g=t.y2}return e},findDotAtSegment:function(b,a,d,c,i,h,g,f,j){var e=1-j;return{x:Math.pow(e,3)*b+Math.pow(e,2)*3*j*d+e*3*j*j*i+Math.pow(j,3)*g,y:Math.pow(e,3)*a+Math.pow(e,2)*3*j*c+e*3*j*j*h+Math.pow(j,3)*f}},snapEnds:function(p,q,d){if(Ext.isDate(p)){return this.snapEndsByDate(p,q,d)}var c=(q-p)/d,a=Math.floor(Math.log(c)/Math.LN10)+1,e=Math.pow(10,a),r,n=Math.round((c%e)*Math.pow(10,2-a)),b=[[0,15],[20,4],[30,2],[40,4],[50,9],[60,4],[70,2],[80,4],[100,15]],g=0,o,j,h,f,k=1000000000,l=b.length;r=p=Math.floor(p/e)*e;for(h=0;h&lt;l;h++){o=b[h][0];j=(o-n)&lt;0?1000000:(o-n)/b[h][1];if(j&lt;k){f=o;k=j}}c=Math.floor(c*Math.pow(10,-a))*Math.pow(10,a)+f*Math.pow(10,a-2);while(r&lt;q){r+=c;g++}q=+r.toFixed(10);return{from:p,to:q,power:a,step:c,steps:g}},snapEndsByDate:function(h,g,b,a){var d=false,f=[[Ext.Date.MILLI,[1,2,3,5,10,20,30,50,100,200,300,500]],[Ext.Date.SECOND,[1,2,3,5,10,15,30]],[Ext.Date.MINUTE,[1,2,3,5,10,20,30]],[Ext.Date.HOUR,[1,2,3,4,6,12]],[Ext.Date.DAY,[1,2,3,7,14]],[Ext.Date.MONTH,[1,2,3,4,6]]],c,e;Ext.each(f,function(k,j){for(c=0;c&lt;k[1].length;c++){if(g&lt;Ext.Date.add(h,k[0],k[1][c]*b)){d=[k[0],k[1][c]];return false}}});if(!d){e=this.snapEnds(h.getFullYear(),g.getFullYear()+1,b,a);d=[Date.YEAR,Math.round(e.step)]}return this.snapEndsByDateAndStep(h,g,d,a)},snapEndsByDateAndStep:function(h,g,e,a){var d=[h.getFullYear(),h.getMonth(),h.getDate(),h.getHours(),h.getMinutes(),h.getSeconds(),h.getMilliseconds()],b=0,f,c;if(a){f=h}else{switch(e[0]){case Ext.Date.MILLI:f=new Date(d[0],d[1],d[2],d[3],d[4],d[5],Math.floor(d[6]/e[1])*e[1]);break;case Ext.Date.SECOND:f=new Date(d[0],d[1],d[2],d[3],d[4],Math.floor(d[5]/e[1])*e[1],0);break;case Ext.Date.MINUTE:f=new Date(d[0],d[1],d[2],d[3],Math.floor(d[4]/e[1])*e[1],0,0);break;case Ext.Date.HOUR:f=new Date(d[0],d[1],d[2],Math.floor(d[3]/e[1])*e[1],0,0,0);break;case Ext.Date.DAY:f=new Date(d[0],d[1],Math.floor(d[2]-1/e[1])*e[1]+1,0,0,0,0);break;case Ext.Date.MONTH:f=new Date(d[0],Math.floor(d[1]/e[1])*e[1],1,0,0,0,0);break;default:f=new Date(Math.floor(d[0]/e[1])*e[1],0,1,0,0,0,0);break}}c=f;while(c&lt;g){c=Ext.Date.add(c,e[0],e[1]);b++}if(a){c=g}return{from:+f,to:+c,step:(c-f)/b,steps:b}},sorter:function(d,c){return d.offset-c.offset},rad:function(a){return a%360*Math.PI/180},degrees:function(a){return a*180/Math.PI%360},withinBox:function(a,c,b){b=b||{};return(a&gt;=b.x&amp;&amp;a&lt;=(b.x+b.width)&amp;&amp;c&gt;=b.y&amp;&amp;c&lt;=(b.y+b.height))},parseGradient:function(j){var e=this,f=j.type||&quot;linear&quot;,c=j.angle||0,h=e.radian,k=j.stops,a=[],i,b,g,d;if(f==&quot;linear&quot;){b=[0,0,Math.cos(c*h),Math.sin(c*h)];g=1/(Math.max(Math.abs(b[2]),Math.abs(b[3]))||1);b[2]*=g;b[3]*=g;if(b[2]&lt;0){b[0]=-b[2];b[2]=0}if(b[3]&lt;0){b[1]=-b[3];b[3]=0}}for(i in k){if(k.hasOwnProperty(i)&amp;&amp;e.stopsRE.test(i)){d={offset:parseInt(i,10),color:Ext.draw.Color.toHex(k[i].color)||&quot;#ffffff&quot;,opacity:k[i].opacity||1};a.push(d)}}Ext.Array.sort(a,e.sorter);if(f==&quot;linear&quot;){return{id:j.id,type:f,vector:b,stops:a}}else{return{id:j.id,type:f,centerX:j.centerX,centerY:j.centerY,focalX:j.focalX,focalY:j.focalY,radius:j.radius,vector:b,stops:a}}}});Ext.define(&quot;Ext.fx.PropertyHandler&quot;,{requires:[&quot;Ext.draw.Draw&quot;],statics:{defaultHandler:{pixelDefaultsRE:/width|height|top$|bottom$|left$|right$/i,unitRE:/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/,scrollRE:/^scroll/i,computeDelta:function(i,c,a,f,h){a=(typeof a==&quot;number&quot;)?a:1;var g=this.unitRE,d=g.exec(i),b,e;if(d){i=d[1];e=d[2];if(!this.scrollRE.test(h)&amp;&amp;!e&amp;&amp;this.pixelDefaultsRE.test(h)){e=&quot;px&quot;}}i=+i||0;d=g.exec(c);if(d){c=d[1];e=d[2]||e}c=+c||0;b=(f!=null)?f:i;return{from:i,delta:(c-b)*a,units:e}},get:function(n,b,a,m,h){var l=n.length,d=[],e,g,k,c,f;for(e=0;e&lt;l;e++){if(m){g=m[e][1].from}if(Ext.isArray(n[e][1])&amp;&amp;Ext.isArray(b)){k=[];c=0;f=n[e][1].length;for(;c&lt;f;c++){k.push(this.computeDelta(n[e][1][c],b[c],a,g,h))}d.push([n[e][0],k])}else{d.push([n[e][0],this.computeDelta(n[e][1],b,a,g,h)])}}return d},set:function(k,f){var g=k.length,c=[],d,a,h,e,b;for(d=0;d&lt;g;d++){a=k[d][1];if(Ext.isArray(a)){h=[];b=0;e=a.length;for(;b&lt;e;b++){h.push(a[b].from+(a[b].delta*f)+(a[b].units||0))}c.push([k[d][0],h])}else{c.push([k[d][0],a.from+(a.delta*f)+(a.units||0)])}}return c}},color:{rgbRE:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,hexRE:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,hex3RE:/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,parseColor:function(a,d){d=(typeof d==&quot;number&quot;)?d:1;var e,c=false,b;Ext.each([this.hexRE,this.rgbRE,this.hex3RE],function(g,f){e=(f%2==0)?16:10;b=g.exec(a);if(b&amp;&amp;b.length==4){if(f==2){b[1]+=b[1];b[2]+=b[2];b[3]+=b[3]}c={red:parseInt(b[1],e),green:parseInt(b[2],e),blue:parseInt(b[3],e)};return false}});return c||a},computeDelta:function(g,a,e,c){g=this.parseColor(g);a=this.parseColor(a,e);var f=c?c:g,b=typeof f,d=typeof a;if(b==&quot;string&quot;||b==&quot;undefined&quot;||d==&quot;string&quot;||d==&quot;undefined&quot;){return a||f}return{from:g,delta:{red:Math.round((a.red-f.red)*e),green:Math.round((a.green-f.green)*e),blue:Math.round((a.blue-f.blue)*e)}}},get:function(h,a,f,d){var g=h.length,c=[],e,b;for(e=0;e&lt;g;e++){if(d){b=d[e][1].from}c.push([h[e][0],this.computeDelta(h[e][1],a,f,b)])}return c},set:function(j,e){var f=j.length,c=[],d,b,a,g,h;for(d=0;d&lt;f;d++){b=j[d][1];if(b){g=b.from;h=b.delta;b=(typeof b==&quot;object&quot;&amp;&amp;&quot;red&quot; in b)?&quot;rgb(&quot;+b.red+&quot;, &quot;+b.green+&quot;, &quot;+b.blue+&quot;)&quot;:b;b=(typeof b==&quot;object&quot;&amp;&amp;b.length)?b[0]:b;if(typeof b==&quot;undefined&quot;){return[]}a=typeof b==&quot;string&quot;?b:&quot;rgb(&quot;+[(g.red+Math.round(h.red*e))%256,(g.green+Math.round(h.green*e))%256,(g.blue+Math.round(h.blue*e))%256].join(&quot;,&quot;)+&quot;)&quot;;c.push([j[d][0],a])}}return c}},object:{interpolate:function(d,b){b=(typeof b==&quot;number&quot;)?b:1;var a={},c;for(c in d){a[c]=parseInt(d[c],10)*b}return a},computeDelta:function(g,a,c,b){g=this.interpolate(g);a=this.interpolate(a,c);var f=b?b:g,e={},d;for(d in a){e[d]=a[d]-f[d]}return{from:g,delta:e}},get:function(h,a,f,d){var g=h.length,c=[],e,b;for(e=0;e&lt;g;e++){if(d){b=d[e][1].from}c.push([h[e][0],this.computeDelta(h[e][1],a,f,b)])}return c},set:function(k,f){var g=k.length,c=[],e={},d,h,j,b,a;for(d=0;d&lt;g;d++){b=k[d][1];h=b.from;j=b.delta;for(a in h){e[a]=Math.round(h[a]+j[a]*f)}c.push([k[d][0],e])}return c}},path:{computeDelta:function(e,a,c,b){c=(typeof c==&quot;number&quot;)?c:1;var d;e=+e||0;a=+a||0;d=(b!=null)?b:e;return{from:e,delta:(a-d)*c}},forcePath:function(a){if(!Ext.isArray(a)&amp;&amp;!Ext.isArray(a[0])){a=Ext.draw.Draw.parsePathString(a)}return a},get:function(b,h,a,p){var c=this.forcePath(h),m=[],r=b.length,d,g,n,f,o,l,e,s,q;for(n=0;n&lt;r;n++){q=this.forcePath(b[n][1]);f=Ext.draw.Draw.interpolatePaths(q,c);q=f[0];c=f[1];d=q.length;s=[];for(l=0;l&lt;d;l++){f=[q[l][0]];g=q[l].length;for(e=1;e&lt;g;e++){o=p&amp;&amp;p[0][1][l][e].from;f.push(this.computeDelta(q[l][e],c[l][e],a,o))}s.push(f)}m.push([b[n][0],s])}return m},set:function(o,m){var n=o.length,e=[],g,f,d,h,l,c,a,b;for(g=0;g&lt;n;g++){c=o[g][1];h=[];a=c.length;for(f=0;f&lt;a;f++){l=[c[f][0]];b=c[f].length;for(d=1;d&lt;b;d++){l.push(c[f][d].from+c[f][d].delta*m)}h.push(l.join(&quot;,&quot;))}e.push([o[g][0],h.join(&quot;,&quot;)])}return e}}}},function(){Ext.each([&quot;outlineColor&quot;,&quot;backgroundColor&quot;,&quot;borderColor&quot;,&quot;borderTopColor&quot;,&quot;borderRightColor&quot;,&quot;borderBottomColor&quot;,&quot;borderLeftColor&quot;,&quot;fill&quot;,&quot;stroke&quot;],function(a){this[a]=this.color},this)});Ext.define(&quot;Ext.fx.Anim&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},requires:[&quot;Ext.fx.Manager&quot;,&quot;Ext.fx.Animator&quot;,&quot;Ext.fx.Easing&quot;,&quot;Ext.fx.CubicBezier&quot;,&quot;Ext.fx.PropertyHandler&quot;],isAnimation:true,duration:250,delay:0,delayStart:0,dynamic:false,easing:&quot;ease&quot;,damper:1,bezierRE:/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,reverse:false,running:false,paused:false,iterations:1,alternate:false,currentIteration:0,startTime:0,constructor:function(a){var b=this,c;a=a||{};if(a.keyframes){return Ext.create(&quot;Ext.fx.Animator&quot;,a)}a=Ext.apply(b,a);if(b.from===undefined){b.from={}}b.propHandlers={};b.config=a;b.target=Ext.fx.Manager.createTarget(b.target);b.easingFn=Ext.fx.Easing[b.easing];b.target.dynamic=b.dynamic;if(!b.easingFn){b.easingFn=String(b.easing).match(b.bezierRE);if(b.easingFn&amp;&amp;b.easingFn.length==5){c=b.easingFn;b.easingFn=Ext.fx.CubicBezier.cubicBezier(+c[1],+c[2],+c[3],+c[4])}}b.id=Ext.id(null,&quot;ext-anim-&quot;);Ext.fx.Manager.addAnim(b);b.addEvents(&quot;beforeanimate&quot;,&quot;afteranimate&quot;,&quot;lastframe&quot;);b.mixins.observable.constructor.call(b,a);if(a.callback){b.on(&quot;afteranimate&quot;,a.callback,a.scope)}return b},setAttr:function(a,b){return Ext.fx.Manager.items.get(this.id).setAttr(this.target,a,b)},initAttrs:function(){var e=this,g=e.from,h=e.to,f=e.initialFrom||{},c={},a,b,i,d;for(d in h){if(h.hasOwnProperty(d)){a=e.target.getAttr(d,g[d]);b=h[d];if(!Ext.fx.PropertyHandler[d]){if(Ext.isObject(b)){i=e.propHandlers[d]=Ext.fx.PropertyHandler.object}else{i=e.propHandlers[d]=Ext.fx.PropertyHandler.defaultHandler}}else{i=e.propHandlers[d]=Ext.fx.PropertyHandler[d]}c[d]=i.get(a,b,e.damper,f[d],d)}}e.currentAttrs=c},start:function(d){var e=this,c=e.delay,b=e.delayStart,a;if(c){if(!b){e.delayStart=d;return}else{a=d-b;if(a&lt;c){return}else{d=new Date(b.getTime()+c)}}}if(e.fireEvent(&quot;beforeanimate&quot;,e)!==false){e.startTime=d;if(!e.paused&amp;&amp;!e.currentAttrs){e.initAttrs()}e.running=true}},runAnim:function(k){var h=this,j=h.currentAttrs,d=h.duration,c=h.easingFn,b=h.propHandlers,f={},g,i,e,a;if(k&gt;=d){k=d;a=true}if(h.reverse){k=d-k}for(e in j){if(j.hasOwnProperty(e)){i=j[e];g=a?1:c(k/d);f[e]=b[e].set(i,g)}}return f},lastFrame:function(){var c=this,a=c.iterations,b=c.currentIteration;b++;if(b&lt;a){if(c.alternate){c.reverse=!c.reverse}c.startTime=new Date();c.currentIteration=b;c.paused=false}else{c.currentIteration=0;c.end();c.fireEvent(&quot;lastframe&quot;,c,c.startTime)}},end:function(){var a=this;a.startTime=0;a.paused=false;a.running=false;Ext.fx.Manager.removeAnim(a);a.fireEvent(&quot;afteranimate&quot;,a,a.startTime)}});Ext.enableFx=true;Ext.define(&quot;Ext.layout.component.Component&quot;,{extend:&quot;Ext.layout.Layout&quot;,type:&quot;component&quot;,monitorChildren:true,initLayout:function(){var c=this,a=c.owner,b=a.el;if(!c.initialized){if(a.frameSize){c.frameSize=a.frameSize}else{a.frameSize=c.frameSize={top:0,left:0,bottom:0,right:0}}}c.callParent(arguments)},beforeLayout:function(b,j,k,h){this.callParent(arguments);var g=this,c=g.owner,d=c.ownerCt,f=c.layout,e=c.isVisible(true),a=c.el.child,i;g.previousComponentSize=g.lastComponentSize;if(!k&amp;&amp;((!Ext.isNumber(b)&amp;&amp;c.isFixedWidth())||(!Ext.isNumber(j)&amp;&amp;c.isFixedHeight()))&amp;&amp;h&amp;&amp;h!==d){g.doContainerLayout();return false}if(!e&amp;&amp;(c.hiddenAncestor||c.floating)){if(c.hiddenAncestor){i=c.hiddenAncestor.layoutOnShow;i.remove(c);i.add(c)}c.needsLayout={width:b,height:j,isSetSize:false}}if(e&amp;&amp;this.needsLayout(b,j)){return c.beforeComponentLayout(b,j,k,h)}else{return false}},needsLayout:function(d,a){var e=this,c,b;e.lastComponentSize=e.lastComponentSize||{width:-Infinity,height:-Infinity};c=!Ext.isDefined(d)||e.lastComponentSize.width!==d;b=!Ext.isDefined(a)||e.lastComponentSize.height!==a;return !e.isSizing&amp;&amp;(e.childrenChanged||c||b)},setElementSize:function(c,b,a){if(b!==undefined&amp;&amp;a!==undefined){c.setSize(b,a)}else{if(a!==undefined){c.setHeight(a)}else{if(b!==undefined){c.setWidth(b)}}}},getTarget:function(){return this.owner.el},getRenderTarget:function(){return this.owner.el},setTargetSize:function(d,a){var e=this;e.setElementSize(e.owner.el,d,a);if(e.owner.frameBody){var g=e.getTargetInfo(),f=g.padding,c=g.border,b=e.frameSize;e.setElementSize(e.owner.frameBody,Ext.isNumber(d)?(d-b.left-b.right-f.left-f.right-c.left-c.right):d,Ext.isNumber(a)?(a-b.top-b.bottom-f.top-f.bottom-c.top-c.bottom):a)}e.autoSized={width:!Ext.isNumber(d),height:!Ext.isNumber(a)};e.lastComponentSize={width:d,height:a}},getTargetInfo:function(){if(!this.targetInfo){var b=this.getTarget(),a=this.owner.getTargetEl();this.targetInfo={padding:{top:b.getPadding(&quot;t&quot;),right:b.getPadding(&quot;r&quot;),bottom:b.getPadding(&quot;b&quot;),left:b.getPadding(&quot;l&quot;)},border:{top:b.getBorderWidth(&quot;t&quot;),right:b.getBorderWidth(&quot;r&quot;),bottom:b.getBorderWidth(&quot;b&quot;),left:b.getBorderWidth(&quot;l&quot;)},bodyMargin:{top:a.getMargin(&quot;t&quot;),right:a.getMargin(&quot;r&quot;),bottom:a.getMargin(&quot;b&quot;),left:a.getMargin(&quot;l&quot;)}}}return this.targetInfo},doOwnerCtLayouts:function(){var b=this.owner,e=b.ownerCt,c,h,d=this.lastComponentSize,g=this.previousComponentSize,a=(g&amp;&amp;d&amp;&amp;Ext.isNumber(d.width))?d.width!==g.width:true,f=(g&amp;&amp;d&amp;&amp;Ext.isNumber(d.height))?d.height!==g.height:true;if(!e||(!a&amp;&amp;!f)){return}c=e.componentLayout;h=e.layout;if(!b.floating&amp;&amp;c&amp;&amp;c.monitorChildren&amp;&amp;!c.layoutBusy){if(!e.suspendLayout&amp;&amp;h&amp;&amp;!h.layoutBusy){if(((a&amp;&amp;!e.isFixedWidth())||(f&amp;&amp;!e.isFixedHeight()))){this.isSizing=true;e.doComponentLayout();this.isSizing=false}else{if(h.bindToOwnerCtContainer===true){h.layout()}}}}},doContainerLayout:function(){var e=this,a=e.owner,c=a.ownerCt,d=a.layout,b;if(!a.suspendLayout&amp;&amp;d&amp;&amp;d.isLayout&amp;&amp;!d.layoutBusy&amp;&amp;!d.isAutoDock){d.layout()}if(c&amp;&amp;c.componentLayout){b=c.componentLayout;if(!a.floating&amp;&amp;b.monitorChildren&amp;&amp;!b.layoutBusy){b.childrenChanged=true}}},afterLayout:function(c,a,b,d){this.doContainerLayout();this.owner.afterComponentLayout(c,a,b,d)}});Ext.define(&quot;Ext.layout.component.AbstractDock&quot;,{extend:&quot;Ext.layout.component.Component&quot;,type:&quot;dock&quot;,autoSizing:true,beforeLayout:function(){var a=this.callParent(arguments);if(a!==false&amp;&amp;(!this.initializedBorders||this.childrenChanged)&amp;&amp;(!this.owner.border||this.owner.manageBodyBorders)){this.handleItemBorders();this.initializedBorders=true}return a},handleItemBorders:function(){var a=this.owner,e=a.body,l=this.getLayoutItems(),g={top:[],right:[],bottom:[],left:[]},b=this.borders,d={top:&quot;bottom&quot;,right:&quot;left&quot;,bottom:&quot;top&quot;,left:&quot;right&quot;},c,h,k,j,f;for(c=0,h=l.length;c&lt;h;c++){k=l[c];j=k.dock;if(k.ignoreBorderManagement){continue}if(!g[j].satisfied){g[j].push(k);g[j].satisfied=true}if(!g.top.satisfied&amp;&amp;d[j]!==&quot;top&quot;){g.top.push(k)}if(!g.right.satisfied&amp;&amp;d[j]!==&quot;right&quot;){g.right.push(k)}if(!g.bottom.satisfied&amp;&amp;d[j]!==&quot;bottom&quot;){g.bottom.push(k)}if(!g.left.satisfied&amp;&amp;d[j]!==&quot;left&quot;){g.left.push(k)}}if(b){for(f in b){if(b.hasOwnProperty(f)){h=b[f].length;if(!a.manageBodyBorders){for(c=0;c&lt;h;c++){b[f][c].removeCls(Ext.baseCSSPrefix+&quot;docked-noborder-&quot;+f)}if(!b[f].satisfied&amp;&amp;!a.bodyBorder){e.removeCls(Ext.baseCSSPrefix+&quot;docked-noborder-&quot;+f)}}else{if(b[f].satisfied){e.setStyle(&quot;border-&quot;+f+&quot;-width&quot;,&quot;&quot;)}}}}}for(f in g){if(g.hasOwnProperty(f)){h=g[f].length;if(!a.manageBodyBorders){for(c=0;c&lt;h;c++){g[f][c].addCls(Ext.baseCSSPrefix+&quot;docked-noborder-&quot;+f)}if((!g[f].satisfied&amp;&amp;!a.bodyBorder)||a.bodyBorder===false){e.addCls(Ext.baseCSSPrefix+&quot;docked-noborder-&quot;+f)}}else{if(g[f].satisfied){e.setStyle(&quot;border-&quot;+f+&quot;-width&quot;,&quot;1px&quot;)}}}}this.borders=g},onLayout:function(a,m){if(this.onLayout_running){return}this.onLayout_running=true;var i=this,b=i.owner,g=b.body,f=b.layout,h=i.getTarget(),k=false,l=false,j,e,d;var c=i.info={boxes:[],size:{width:a,height:m},bodyBox:{}};delete f.isAutoDock;Ext.applyIf(c,i.getTargetInfo());if(b&amp;&amp;b.ownerCt&amp;&amp;b.ownerCt.layout&amp;&amp;b.ownerCt.layout.isLayout){if(!Ext.isNumber(b.height)||!Ext.isNumber(b.width)){b.ownerCt.layout.bindToOwnerCtComponent=true}else{b.ownerCt.layout.bindToOwnerCtComponent=false}}if(m==null||a==null){j=c.padding;e=c.border;d=i.frameSize;if((m==null)&amp;&amp;(a==null)){l=true;k=true;i.setTargetSize(null);i.setBodyBox({width:null,height:null})}else{if(m==null){l=true;i.setTargetSize(a);i.setBodyBox({width:a-j.left-e.left-j.right-e.right-d.left-d.right,height:null})}else{k=true;i.setTargetSize(null,m);i.setBodyBox({width:null,height:m-j.top-j.bottom-e.top-e.bottom-d.top-d.bottom})}}if(f&amp;&amp;f.isLayout){f.bindToOwnerCtComponent=true;f.isAutoDock=f.autoSize!==true;f.layout();c.autoSizedCtLayout=f.autoSize===true;c.autoHeight=l;c.autoWidth=k}i.dockItems();i.setTargetSize(c.size.width,c.size.height)}else{i.setTargetSize(a,m);i.dockItems()}i.callParent(arguments);this.onLayout_running=false},dockItems:function(){this.calculateDockBoxes();var g=this.info,h=g.autoWidth,a=g.autoHeight,c=g.boxes,f=c.length,e,b,d;for(b=0;b&lt;f;b++){e=c[b];d=e.item;d.setPosition(e.x,e.y);if((h||a)&amp;&amp;d.layout&amp;&amp;d.layout.isLayout){d.layout.bindToOwnerCtComponent=true}}if(!g.autoSizedCtLayout){if(h){g.bodyBox.width=null}if(a){g.bodyBox.height=null}}this.setBodyBox(g.bodyBox)},calculateDockBoxes:function(){if(this.calculateDockBoxes_running){return}this.calculateDockBoxes_running=true;var k=this,g=k.getTarget(),j=k.getLayoutItems(),a=k.owner,q=a.body,b=k.info,n=b.autoWidth,o=b.autoHeight,r=b.size,h=j.length,m=b.padding,d=b.border,c=k.frameSize,p,e,f,l;if(o){r.height=q.getHeight()+m.top+d.top+m.bottom+d.bottom+c.top+c.bottom}else{r.height=g.getHeight()}if(n){r.width=q.getWidth()+m.left+d.left+m.right+d.right+c.left+c.right}else{r.width=g.getWidth()}b.bodyBox={x:m.left+c.left,y:m.top+c.top,width:r.width-m.left-d.left-m.right-d.right-c.left-c.right,height:r.height-d.top-m.top-d.bottom-m.bottom-c.top-c.bottom};for(e=0;e&lt;h;e++){p=j[e];f=k.initBox(p);if(o===true){f=k.adjustAutoBox(f,e)}else{f=k.adjustSizedBox(f,e)}b.boxes.push(f)}this.calculateDockBoxes_running=false},adjustSizedBox:function(e,d){var a=this.info.bodyBox,b=this.frameSize,g=this.info,f=g.padding,h=e.type,c=g.border;switch(h){case&quot;top&quot;:e.y=a.y;break;case&quot;left&quot;:e.x=a.x;break;case&quot;bottom&quot;:e.y=(a.y+a.height)-e.height;break;case&quot;right&quot;:e.x=(a.x+a.width)-e.width;break}if(e.ignoreFrame){if(h==&quot;bottom&quot;){e.y+=(b.bottom+f.bottom+c.bottom)}else{e.y-=(b.top+f.top+c.top)}if(h==&quot;right&quot;){e.x+=(b.right+f.right+c.right)}else{e.x-=(b.left+f.left+c.left)}}if(!e.overlay){switch(h){case&quot;top&quot;:a.y+=e.height;a.height-=e.height;break;case&quot;left&quot;:a.x+=e.width;a.width-=e.width;break;case&quot;bottom&quot;:a.height-=e.height;break;case&quot;right&quot;:a.width-=e.width;break}}return e},adjustAutoBox:function(h,l){var b=this.info,a=this.owner,m=b.bodyBox,q=b.size,j=b.boxes,f=j.length,o=h.type,e=this.frameSize,p=b.padding,d=b.border,c=b.autoSizedCtLayout,n=(f&lt;l)?f:l,g,k;if(o==&quot;top&quot;||o==&quot;bottom&quot;){for(g=0;g&lt;n;g++){k=j[g];if(k.stretched&amp;&amp;k.type==&quot;left&quot;||k.type==&quot;right&quot;){k.height+=h.height}else{if(k.type==&quot;bottom&quot;){k.y+=h.height}}}}switch(o){case&quot;top&quot;:h.y=m.y;if(!h.overlay){m.y+=h.height;if(b.autoHeight){q.height+=h.height}else{m.height-=h.height}}break;case&quot;bottom&quot;:if(!h.overlay){if(b.autoHeight){q.height+=h.height}else{m.height-=h.height}}h.y=(m.y+m.height);break;case&quot;left&quot;:h.x=m.x;if(!h.overlay){m.x+=h.width;if(b.autoWidth){q.width+=h.width}else{m.width-=h.width}}break;case&quot;right&quot;:if(!h.overlay){if(b.autoWidth){q.width+=h.width}else{m.width-=h.width}}h.x=(m.x+m.width);break}if(h.ignoreFrame){if(o==&quot;bottom&quot;){h.y+=(e.bottom+p.bottom+d.bottom)}else{h.y-=(e.top+p.top+d.top)}if(o==&quot;right&quot;){h.x+=(e.right+p.right+d.right)}else{h.x-=(e.left+p.left+d.left)}}return h},initBox:function(j){var h=this,g=h.info.bodyBox,a=(j.dock==&quot;top&quot;||j.dock==&quot;bottom&quot;),b=h.owner,e=h.frameSize,c=h.info,i=c.padding,d=c.border,f={item:j,overlay:j.overlay,type:j.dock,offsets:Ext.Element.parseBox(j.offsets||{}),ignoreFrame:j.ignoreParentFrame};if(j.stretch!==false){f.stretched=true;if(a){f.x=g.x+f.offsets.left;f.width=g.width-(f.offsets.left+f.offsets.right);if(f.ignoreFrame){f.width+=(e.left+e.right+d.left+d.right+i.left+i.right)}j.setCalculatedSize(f.width-j.el.getMargin(&quot;lr&quot;),undefined,b)}else{f.y=g.y+f.offsets.top;f.height=g.height-(f.offsets.bottom+f.offsets.top);if(f.ignoreFrame){f.height+=(e.top+e.bottom+d.top+d.bottom+i.top+i.bottom)}j.setCalculatedSize(undefined,f.height-j.el.getMargin(&quot;tb&quot;),b);if(!Ext.supports.ComputedStyle){j.el.repaint()}}}else{j.doComponentLayout();f.width=j.getWidth()-(f.offsets.left+f.offsets.right);f.height=j.getHeight()-(f.offsets.bottom+f.offsets.top);f.y+=f.offsets.top;if(a){f.x=(j.align==&quot;right&quot;)?g.width-f.width:g.x;f.x+=f.offsets.left}}if(f.width===undefined){f.width=j.getWidth()+j.el.getMargin(&quot;lr&quot;)}if(f.height===undefined){f.height=j.getHeight()+j.el.getMargin(&quot;tb&quot;)}return f},getLayoutItems:function(){var c=this.owner.getDockedItems(),d=c.length,b=0,a=[];for(;b&lt;d;b++){if(c[b].isVisible(true)){a.push(c[b])}}return a},renderItems:function(g,e){var a=e.dom.childNodes,d=a.length,f=g.length,k=0,c,b,h,l;for(c=0;c&lt;d;c++){h=Ext.get(a[c]);for(b=0;b&lt;f;b++){l=g[b];if(l.rendered&amp;&amp;(h.id==l.el.id||h.contains(l.el.id))){break}}if(b===f){k++}}for(c=0,b=0;c&lt;f;c++,b++){l=g[c];if(c===b&amp;&amp;(l.dock===&quot;right&quot;||l.dock===&quot;bottom&quot;)){b+=k}if(l&amp;&amp;!l.rendered){this.renderItem(l,e,b)}else{if(!this.isValidParent(l,e,b)){this.moveItem(l,e,b)}}}},setBodyBox:function(f){var h=this,a=h.owner,g=a.body,b=h.info,e=b.bodyMargin,i=b.padding,d=b.border,c=h.frameSize;if(a.collapsed){return}if(Ext.isNumber(f.width)){f.width-=e.left+e.right}if(Ext.isNumber(f.height)){f.height-=e.top+e.bottom}h.setElementSize(g,f.width,f.height);if(Ext.isNumber(f.x)){g.setLeft(f.x-i.left-c.left)}if(Ext.isNumber(f.y)){g.setTop(f.y-i.top-c.top)}},configureItem:function(a,b){this.callParent(arguments);if(a.dock==&quot;top&quot;||a.dock==&quot;bottom&quot;){a.layoutManagedWidth=1;a.layoutManagedHeight=2}else{a.layoutManagedWidth=2;a.layoutManagedHeight=1}a.addCls(Ext.baseCSSPrefix+&quot;docked&quot;);a.addClsWithUI(&quot;docked-&quot;+a.dock)},afterRemove:function(a){this.callParent(arguments);if(this.itemCls){a.el.removeCls(this.itemCls+&quot;-&quot;+a.dock)}var b=a.el.dom;if(!a.destroying&amp;&amp;b){b.parentNode.removeChild(b)}this.childrenChanged=true}});Ext.define(&quot;Ext.layout.component.Dock&quot;,{alias:[&quot;layout.dock&quot;],extend:&quot;Ext.layout.component.AbstractDock&quot;});Ext.define(&quot;Ext.layout.component.Tip&quot;,{alias:[&quot;layout.tip&quot;],extend:&quot;Ext.layout.component.Dock&quot;,type:&quot;tip&quot;,onLayout:function(b,i){var g=this,c=g.owner,d=c.el,a,h,f,e,j=d.getXY();d.setXY([-9999,-9999]);this.callParent(arguments);if(!Ext.isNumber(b)){a=c.minWidth;h=c.maxWidth;if(Ext.isStrict&amp;&amp;(Ext.isIE6||Ext.isIE7)){e=g.doAutoWidth()}else{f=d.getWidth()}if(f&lt;a){e=a}else{if(f&gt;h){e=h}}if(e){this.callParent([e,i])}}d.setXY(j)},doAutoWidth:function(){var d=this,b=d.owner,a=b.body,c=a.getTextWidth();if(b.header){c=Math.max(c,b.header.getWidth())}if(!Ext.isDefined(d.frameWidth)){d.frameWidth=b.el.getWidth()-a.getWidth()}c+=d.frameWidth+a.getPadding(&quot;lr&quot;);return c}});Ext.define(&quot;Ext.util.Region&quot;,{requires:[&quot;Ext.util.Offset&quot;],statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,f,a,c){var e=this;e.y=e.top=e[1]=d;e.right=f;e.bottom=a;e.x=e.left=e[0]=c},contains:function(b){var a=this;return(b.x&gt;=a.x&amp;&amp;b.right&lt;=a.right&amp;&amp;b.y&gt;=a.y&amp;&amp;b.bottom&lt;=a.bottom)},intersect:function(g){var f=this,d=Math.max(f.y,g.y),e=Math.min(f.right,g.right),a=Math.min(f.bottom,g.bottom),c=Math.max(f.x,g.x);if(a&gt;d&amp;&amp;e&gt;c){return new this.self(d,e,a,c)}else{return false}},union:function(g){var f=this,d=Math.min(f.y,g.y),e=Math.max(f.right,g.right),a=Math.max(f.bottom,g.bottom),c=Math.min(f.x,g.x);return new this.self(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.Number.constrain;a.top=a.y=c(a.top,b.y,b.bottom);a.bottom=c(a.bottom,b.y,b.bottom);a.left=a.x=c(a.left,b.x,b.right);a.right=c(a.right,b.x,b.right);return a},adjust:function(d,f,a,c){var e=this;e.top=e.y+=d;e.left=e.x+=c;e.right+=f;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a==&quot;x&quot;){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=Ext.create(&quot;Ext.util.Offset&quot;);c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a&lt;=this.x){return this.x-a}else{if(a&gt;=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a&lt;=this.y){return this.y-a}else{if(a&gt;=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a==&quot;x&quot;){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(a&lt;this.x||a&gt;this.right)},isOutOfBoundY:function(a){return(a&lt;this.y||a&gt;this.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b==&quot;x&quot;){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b&lt;=this.x){b-=(b-this.x)*a}else{if(b&gt;=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b&lt;=this.y){b-=(b-this.y)*a}else{if(b&gt;=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.x,height:this.bottom-this.y}},copy:function(){return new this.self(this.y,this.right,this.bottom,this.x)},copyFrom:function(b){var a=this;a.top=a.y=a[1]=b.y;a.right=b.right;a.bottom=b.bottom;a.left=a.x=a[0]=b.x;return this},toString:function(){return&quot;Region[&quot;+this.top+&quot;,&quot;+this.right+&quot;,&quot;+this.bottom+&quot;,&quot;+this.left+&quot;]&quot;},translateBy:function(a,c){if(arguments.length==1){c=a.y;a=a.x}var b=this;b.top=b.y+=c;b.right+=a;b.bottom+=c;b.left=b.x+=a;return b},round:function(){var a=this;a.top=a.y=Math.round(a.y);a.right=Math.round(a.right);a.bottom=Math.round(a.bottom);a.left=a.x=Math.round(a.x);return a},equals:function(a){return(this.top==a.top&amp;&amp;this.right==a.right&amp;&amp;this.bottom==a.bottom&amp;&amp;this.left==a.left)}});Ext.define(&quot;Ext.dd.DragDropManager&quot;,{singleton:true,requires:[&quot;Ext.util.Region&quot;],uses:[&quot;Ext.tip.QuickTipManager&quot;],alternateClassName:[&quot;Ext.dd.DragDropMgr&quot;,&quot;Ext.dd.DDM&quot;],ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(c,b){for(var d in this.ids){for(var a in this.ids[d]){var e=this.ids[d][a];if(!this.isTypeOfDD(e)){continue}e[c].apply(e,b)}}},_onLoad:function(){this.init();var a=Ext.EventManager;a.on(document,&quot;mouseup&quot;,this.handleMouseUp,this,true);a.on(document,&quot;mousemove&quot;,this.handleMouseMove,this,true);a.on(window,&quot;unload&quot;,this._onUnload,this,true);a.on(window,&quot;resize&quot;,this._onResize,this,true)},_onResize:function(a){this._execOnAll(&quot;resetConstraints&quot;,[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(b,a){if(!this.initialized){this.init()}if(!this.ids[a]){this.ids[a]={}}this.ids[a][b.id]=b},removeDDFromGroup:function(c,a){if(!this.ids[a]){this.ids[a]={}}var b=this.ids[a];if(b&amp;&amp;b[c.id]){delete b[c.id]}},_remove:function(b){for(var a in b.groups){if(a&amp;&amp;this.ids[a]&amp;&amp;this.ids[a][b.id]){delete this.ids[a][b.id]}}delete this.handleIds[b.id]},regHandle:function(b,a){if(!this.handleIds[b]){this.handleIds[b]={}}this.handleIds[b][a]=a},isDragDrop:function(a){return(this.getDDById(a))?true:false},getRelated:function(f,b){var e=[];for(var d in f.groups){for(var c in this.ids[d]){var a=this.ids[d][c];if(!this.isTypeOfDD(a)){continue}if(!b||a.isTarget){e[e.length]=a}}}return e},isLegalTarget:function(e,d){var b=this.getRelated(e,true);for(var c=0,a=b.length;c&lt;a;++c){if(b[c].id==d.id){return true}}return false},isTypeOfDD:function(a){return(a&amp;&amp;a.__ygDragDrop)},isHandle:function(b,a){return(this.handleIds[b]&amp;&amp;this.handleIds[b][a])},getDDById:function(b){for(var a in this.ids){if(this.ids[a][b]){return this.ids[a][b]}}return null},handleMouseDown:function(c,b){if(Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddDisable()}if(this.dragCurrent){this.handleMouseUp(c)}this.currentTarget=c.getTarget();this.dragCurrent=b;var a=b.getEl();this.startX=c.getPageX();this.startY=c.getPageY();this.deltaX=this.startX-a.offsetLeft;this.deltaY=this.startY-a.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var d=Ext.dd.DragDropManager;d.startDrag(d.startX,d.startY)},this.clickTimeThresh)},startDrag:function(a,b){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(a,b);this.dragCurrent.startDrag(a,b)}this.dragThreshMet=true},handleMouseUp:function(a){if(Ext.tip&amp;&amp;Ext.tip.QuickTipManager){Ext.tip.QuickTipManager.ddEnable()}if(!this.dragCurrent){return}clearTimeout(this.clickTimeout);if(this.dragThreshMet){this.fireEvents(a,true)}else{}this.stopDrag(a);this.stopEvent(a)},stopEvent:function(a){if(this.stopPropagation){a.stopPropagation()}if(this.preventDefault){a.preventDefault()}},stopDrag:function(a){if(this.dragCurrent){if(this.dragThreshMet){this.dragCurrent.b4EndDrag(a);this.dragCurrent.endDrag(a)}this.dragCurrent.onMouseUp(a)}this.dragCurrent=null;this.dragOvers={}},handleMouseMove:function(c){if(!this.dragCurrent){return true}if(Ext.isIE&amp;&amp;(c.button!==0&amp;&amp;c.button!==1&amp;&amp;c.button!==2)){this.stopEvent(c);return this.handleMouseUp(c)}if(!this.dragThreshMet){var b=Math.abs(this.startX-c.getPageX());var a=Math.abs(this.startY-c.getPageY());if(b&gt;this.clickPixelThresh||a&gt;this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(c);this.dragCurrent.onDrag(c);if(!this.dragCurrent.moveOnly){this.fireEvents(c,false)}}this.stopEvent(c);return true},fireEvents:function(l,m){var o=this.dragCurrent;if(!o||o.isLocked()){return}var p=l.getPoint();var a=[];var d=[];var j=[];var g=[];var c=[];for(var f in this.dragOvers){var b=this.dragOvers[f];if(!this.isTypeOfDD(b)){continue}if(!this.isOverTarget(p,b,this.mode)){d.push(b)}a[f]=true;delete this.dragOvers[f]}for(var n in o.groups){if(&quot;string&quot;!=typeof n){continue}for(f in this.ids[n]){var h=this.ids[n][f];if(!this.isTypeOfDD(h)){continue}if(h.isTarget&amp;&amp;!h.isLocked()&amp;&amp;((h!=o)||(o.ignoreSelf===false))){if(this.isOverTarget(p,h,this.mode)){if(m){g.push(h)}else{if(!a[h.id]){c.push(h)}else{j.push(h)}this.dragOvers[h.id]=h}}}}}if(this.mode){if(d.length){o.b4DragOut(l,d);o.onDragOut(l,d)}if(c.length){o.onDragEnter(l,c)}if(j.length){o.b4DragOver(l,j);o.onDragOver(l,j)}if(g.length){o.b4DragDrop(l,g);o.onDragDrop(l,g)}}else{var k=0;for(f=0,k=d.length;f&lt;k;++f){o.b4DragOut(l,d[f].id);o.onDragOut(l,d[f].id)}for(f=0,k=c.length;f&lt;k;++f){o.onDragEnter(l,c[f].id)}for(f=0,k=j.length;f&lt;k;++f){o.b4DragOver(l,j[f].id);o.onDragOver(l,j[f].id)}for(f=0,k=g.length;f&lt;k;++f){o.b4DragDrop(l,g[f].id);o.onDragDrop(l,g[f].id)}}if(m&amp;&amp;!g.length){o.onInvalidDrop(l)}},getBestMatch:function(c){var e=null;var b=c.length;if(b==1){e=c[0]}else{for(var d=0;d&lt;b;++d){var a=c[d];if(a.cursorIsOver){e=a;break}else{if(!e||e.overlap.getArea()&lt;a.overlap.getArea()){e=a}}}}return e},refreshCache:function(b){for(var a in b){if(&quot;string&quot;!=typeof a){continue}for(var c in this.ids[a]){var d=this.ids[a][c];if(this.isTypeOfDD(d)){var e=this.getLocation(d);if(e){this.locationCache[d.id]=e}else{delete this.locationCache[d.id]}}}}},verifyEl:function(b){if(b){var a;if(Ext.isIE){try{a=b.offsetParent}catch(c){}}else{a=b.offsetParent}if(a){return true}}return false},getLocation:function(h){if(!this.isTypeOfDD(h)){return null}if(h.getRegion){return h.getRegion()}var f=h.getEl(),k,d,c,n,m,o,a,j,g;try{k=Ext.Element.getXY(f)}catch(i){}if(!k){return null}d=k[0];c=d+f.offsetWidth;n=k[1];m=n+f.offsetHeight;o=n-h.padding[0];a=c+h.padding[1];j=m+h.padding[2];g=d-h.padding[3];return Ext.create(&quot;Ext.util.Region&quot;,o,a,j,g)},isOverTarget:function(i,a,c){var e=this.locationCache[a.id];if(!e||!this.useCache){e=this.getLocation(a);this.locationCache[a.id]=e}if(!e){return false}a.cursorIsOver=e.contains(i);var h=this.dragCurrent;if(!h||!h.getTargetCoord||(!c&amp;&amp;!h.constrainX&amp;&amp;!h.constrainY)){return a.cursorIsOver}a.overlap=null;var f=h.getTargetCoord(i.x,i.y);var b=h.getDragEl();var d=Ext.create(&quot;Ext.util.Region&quot;,f.y,f.x+b.offsetWidth,f.y+b.offsetHeight,f.x);var g=d.intersect(e);if(g){a.overlap=g;return(c)?true:a.cursorIsOver}else{return false}},_onUnload:function(b,a){Ext.dd.DragDropManager.unregAll()},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null}this._execOnAll(&quot;unreg&quot;,[]);for(var a in this.elementCache){delete this.elementCache[a]}this.elementCache={};this.ids={}},elementCache:{},getElWrapper:function(b){var a=this.elementCache[b];if(!a||!a.el){a=this.elementCache[b]=new this.ElementWrapper(Ext.getDom(b))}return a},getElement:function(a){return Ext.getDom(a)},getCss:function(b){var a=Ext.getDom(b);return(a)?a.style:null},ElementWrapper:function(a){this.el=a||null;this.id=this.el&amp;&amp;a.id;this.css=this.el&amp;&amp;a.style},getPosX:function(a){return Ext.Element.getX(a)},getPosY:function(a){return Ext.Element.getY(a)},swapNode:function(c,a){if(c.swapNode){c.swapNode(a)}else{var d=a.parentNode;var b=a.nextSibling;if(b==c){d.insertBefore(c,a)}else{if(a==c.nextSibling){d.insertBefore(a,c)}else{c.parentNode.replaceChild(a,c);d.insertBefore(c,b)}}}},getScroll:function(){var d=window.document,e=d.documentElement,a=d.body,c=0,b=0;if(Ext.isGecko4){c=window.scrollYOffset;b=window.scrollXOffset}else{if(e&amp;&amp;(e.scrollTop||e.scrollLeft)){c=e.scrollTop;b=e.scrollLeft}else{if(a){c=a.scrollTop;b=a.scrollLeft}}}return{top:c,left:b}},getStyle:function(b,a){return Ext.fly(b).getStyle(a)},getScrollTop:function(){return this.getScroll().top},getScrollLeft:function(){return this.getScroll().left},moveToEl:function(a,c){var b=Ext.Element.getXY(c);Ext.Element.setXY(a,b)},numericSort:function(d,c){return(d-c)},_timeoutCount:0,_addListeners:function(){if(document){this._onLoad()}else{if(this._timeoutCount&gt;2000){}else{setTimeout(this._addListeners,10);if(document&amp;&amp;document.body){this._timeoutCount+=1}}}},handleWasClicked:function(a,c){if(this.isHandle(c,a.id)){return true}else{var b=a.parentNode;while(b){if(this.isHandle(c,b.id)){return true}else{b=b.parentNode}}}return false}},function(){this._addListeners()});Ext.define(&quot;Ext.layout.container.Container&quot;,{extend:&quot;Ext.layout.container.AbstractContainer&quot;,alternateClassName:&quot;Ext.layout.ContainerLayout&quot;,layoutItem:function(b,a){if(a){b.doComponentLayout(a.width,a.height)}else{b.doComponentLayout()}},getLayoutTargetSize:function(){var b=this.getTarget(),a;if(b){a=b.getViewSize();if(Ext.isIE&amp;&amp;a.width==0){a=b.getStyleSize()}a.width-=b.getPadding(&quot;lr&quot;);a.height-=b.getPadding(&quot;tb&quot;)}return a},beforeLayout:function(){if(this.owner.beforeLayout(arguments)!==false){return this.callParent(arguments)}else{return false}},getRenderedItems:function(){var e=this,g=e.getTarget(),a=e.getLayoutItems(),d=a.length,f=[],b,c;for(b=0;b&lt;d;b++){c=a[b];if(c.rendered&amp;&amp;e.isValidParent(c,g,b)){f.push(c)}}return f},getVisibleItems:function(){var f=this.getTarget(),b=this.getLayoutItems(),e=b.length,a=[],c,d;for(c=0;c&lt;e;c++){d=b[c];if(d.rendered&amp;&amp;this.isValidParent(d,f,c)&amp;&amp;d.hidden!==true){a.push(d)}}return a}});Ext.define(&quot;Ext.layout.container.Auto&quot;,{alias:[&quot;layout.auto&quot;,&quot;layout.autocontainer&quot;],extend:&quot;Ext.layout.container.Container&quot;,type:&quot;autocontainer&quot;,bindToOwnerCtComponent:true,onLayout:function(a,f){var e=this,b=e.getLayoutItems(),d=b.length,c;if(d){if(!e.clearEl){e.clearEl=e.getRenderTarget().createChild({cls:Ext.baseCSSPrefix+&quot;clear&quot;,role:&quot;presentation&quot;})}for(c=0;c&lt;d;c++){e.setItemSize(b[c])}}},configureItem:function(a){this.callParent(arguments);a.layoutManagedHeight=2;a.layoutManagedWidth=2}});Ext.define(&quot;Ext.layout.container.boxOverflow.Scroller&quot;,{extend:&quot;Ext.layout.container.boxOverflow.None&quot;,requires:[&quot;Ext.util.ClickRepeater&quot;,&quot;Ext.Element&quot;],alternateClassName:&quot;Ext.layout.boxOverflow.Scroller&quot;,mixins:{observable:&quot;Ext.util.Observable&quot;},animateScroll:false,scrollIncrement:20,wheelIncrement:10,scrollRepeatInterval:60,scrollDuration:400,scrollerCls:Ext.baseCSSPrefix+&quot;box-scroller&quot;,constructor:function(b,a){this.layout=b;Ext.apply(this,a||{});this.addEvents(&quot;scroll&quot;)},initCSSClasses:function(){var b=this,a=b.layout;if(!b.CSSinitialized){b.beforeCtCls=b.beforeCtCls||Ext.baseCSSPrefix+&quot;box-scroller-&quot;+a.parallelBefore;b.afterCtCls=b.afterCtCls||Ext.baseCSSPrefix+&quot;box-scroller-&quot;+a.parallelAfter;b.beforeScrollerCls=b.beforeScrollerCls||Ext.baseCSSPrefix+a.owner.getXType()+&quot;-scroll-&quot;+a.parallelBefore;b.afterScrollerCls=b.afterScrollerCls||Ext.baseCSSPrefix+a.owner.getXType()+&quot;-scroll-&quot;+a.parallelAfter;b.CSSinitializes=true}},handleOverflow:function(a,f){var e=this,d=e.layout,c=&quot;get&quot;+d.parallelPrefixCap,b={};e.initCSSClasses();e.callParent(arguments);this.createInnerElements();this.showScrollers();b[d.perpendicularPrefix]=f[d.perpendicularPrefix];b[d.parallelPrefix]=f[d.parallelPrefix]-(e.beforeCt[c]()+e.afterCt[c]());return{targetSize:b}},createInnerElements:function(){var a=this,b=a.layout.getRenderTarget();if(!a.beforeCt){b.addCls(Ext.baseCSSPrefix+a.layout.direction+&quot;-box-overflow-body&quot;);a.beforeCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+&quot; &quot;+a.beforeCtCls},&quot;before&quot;);a.afterCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+&quot; &quot;+a.afterCtCls},&quot;after&quot;);a.createWheelListener()}},createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(a){a.stopEvent();this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)}})},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers();this.beforeScroller.show();this.afterScroller.show();this.updateScrollButtons();this.layout.owner.addClsWithUI(&quot;scroller&quot;)},hideScrollers:function(){if(this.beforeScroller!=undefined){this.beforeScroller.hide();this.afterScroller.hide();this.layout.owner.removeClsWithUI(&quot;scroller&quot;)}},createScrollers:function(){if(!this.beforeScroller&amp;&amp;!this.afterScroller){var a=this.beforeCt.createChild({cls:Ext.String.format(&quot;{0} {1} &quot;,this.scrollerCls,this.beforeScrollerCls)});var b=this.afterCt.createChild({cls:Ext.String.format(&quot;{0} {1}&quot;,this.scrollerCls,this.afterScrollerCls)});a.addClsOnOver(this.beforeScrollerCls+&quot;-hover&quot;);b.addClsOnOver(this.afterScrollerCls+&quot;-hover&quot;);a.setVisibilityMode(Ext.Element.DISPLAY);b.setVisibilityMode(Ext.Element.DISPLAY);this.beforeRepeater=Ext.create(&quot;Ext.util.ClickRepeater&quot;,a,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this});this.afterRepeater=Ext.create(&quot;Ext.util.ClickRepeater&quot;,b,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this});this.beforeScroller=a;this.afterScroller=b}},destroy:function(){Ext.destroy(this.beforeRepeater,this.afterRepeater,this.beforeScroller,this.afterScroller,this.beforeCt,this.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){if(this.beforeScroller==undefined||this.afterScroller==undefined){return}var d=this.atExtremeBefore()?&quot;addCls&quot;:&quot;removeCls&quot;,c=this.atExtremeAfter()?&quot;addCls&quot;:&quot;removeCls&quot;,a=this.beforeScrollerCls+&quot;-disabled&quot;,b=this.afterScrollerCls+&quot;-disabled&quot;;this.beforeScroller[d](a);this.afterScroller[c](b);this.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(){this.scrollBy(-this.scrollIncrement,false)},scrollRight:function(){this.scrollBy(this.scrollIncrement,false)},getScrollPosition:function(){var a=this.layout;return parseInt(a.innerCt.dom[&quot;scroll&quot;+a.parallelBeforeCap],10)||0},getMaxScrollPosition:function(){var a=this.layout;return a.innerCt.dom[&quot;scroll&quot;+a.parallelPrefixCap]-this.layout.innerCt[&quot;get&quot;+a.parallelPrefixCap]()},atExtremeAfter:function(){return this.getScrollPosition()&gt;=this.getMaxScrollPosition()},scrollTo:function(a,b){var f=this,e=f.layout,d=f.getScrollPosition(),c=Ext.Number.constrain(a,0,f.getMaxScrollPosition());if(c!=d&amp;&amp;!f.scrolling){if(b==undefined){b=f.animateScroll}e.innerCt.scrollTo(e.parallelBefore,c,b?f.getScrollAnim():false);if(b){f.scrolling=true}else{f.scrolling=false;f.updateScrollButtons()}f.fireEvent(&quot;scroll&quot;,f,c,b?f.getScrollAnim():false)}},scrollToItem:function(g,b){var f=this,e=f.layout,a,d,c;g=f.getItem(g);if(g!=undefined){a=this.getItemVisibility(g);if(!a.fullyVisible){d=g.getBox(true,true);c=d[e.parallelPosition];if(a.hiddenEnd){c-=(this.layout.innerCt[&quot;get&quot;+e.parallelPrefixCap]()-d[e.parallelPrefix])}this.scrollTo(c,b)}}},getItemVisibility:function(f){var e=this,d=e.getItem(f).getBox(true,true),c=e.layout,b=d[c.parallelPosition],g=b+d[c.parallelPrefix],h=e.getScrollPosition(),a=h+c.innerCt[&quot;get&quot;+c.parallelPrefixCap]();return{hiddenStart:b&lt;h,hiddenEnd:g&gt;a,fullyVisible:b&gt;h&amp;&amp;g&lt;a}}});Ext.define(&quot;Ext.dd.DragDrop&quot;,{requires:[&quot;Ext.dd.DragDropManager&quot;],constructor:function(c,a,b){if(c){this.init(c,a,b)}},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(a,b){},startDrag:function(a,b){},b4Drag:function(a){},onDrag:function(a){},onDragEnter:function(a,b){},b4DragOver:function(a){},onDragOver:function(a,b){},b4DragOut:function(a){},onDragOut:function(a,b){},b4DragDrop:function(a){},onDragDrop:function(a,b){},onInvalidDrop:function(a){},b4EndDrag:function(a){},endDrag:function(a){},b4MouseDown:function(a){},onMouseDown:function(a){},onMouseUp:function(a){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(h,f,m){if(Ext.isNumber(f)){f={left:f,right:f,top:f,bottom:f}}f=f||this.defaultPadding;var j=Ext.get(this.getEl()).getBox(),a=Ext.get(h),l=a.getScroll(),i,d=a.dom;if(d==document.body){i={x:l.left,y:l.top,width:Ext.Element.getViewWidth(),height:Ext.Element.getViewHeight()}}else{var k=a.getXY();i={x:k[0],y:k[1],width:d.clientWidth,height:d.clientHeight}}var g=j.y-i.y,e=j.x-i.x;this.resetConstraints();this.setXConstraint(e-(f.left||0),i.width-e-j.width-(f.right||0),this.xTickSize);this.setYConstraint(g-(f.top||0),i.height-g-j.height-(f.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(c,a,b){this.initTarget(c,a,b);Ext.EventManager.on(this.id,&quot;mousedown&quot;,this.handleMouseDown,this)},initTarget:function(c,a,b){this.config=b||{};this.DDMInstance=Ext.dd.DragDropManager;this.groups={};if(typeof c!==&quot;string&quot;){c=Ext.id(c)}this.id=c;this.addToGroup((a)?a:&quot;default&quot;);this.handleElId=c;this.setDragElId(c);this.invalidHandleTypes={A:&quot;A&quot;};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(c,a,d,b){if(!a&amp;&amp;0!==a){this.padding=[c,c,c,c]}else{if(!d&amp;&amp;0!==d){this.padding=[c,a,c,a]}else{this.padding=[c,a,d,b]}}},setInitPosition:function(d,c){var e=this.getEl();if(!this.DDMInstance.verifyEl(e)){return}var b=d||0;var a=c||0;var f=Ext.Element.getXY(e);this.initPageX=f[0]-b;this.initPageY=f[1]-a;this.lastPageX=f[0];this.lastPageY=f[1];this.setStartPosition(f)},setStartPosition:function(b){var a=b||Ext.Element.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=a[0];this.startPageY=a[1]},addToGroup:function(a){this.groups[a]=true;this.DDMInstance.regDragDrop(this,a)},removeFromGroup:function(a){if(this.groups[a]){delete this.groups[a]}this.DDMInstance.removeDDFromGroup(this,a)},setDragElId:function(a){this.dragElId=a},setHandleElId:function(a){if(typeof a!==&quot;string&quot;){a=Ext.id(a)}this.handleElId=a;this.DDMInstance.regHandle(this.id,a)},setOuterHandleElId:function(a){if(typeof a!==&quot;string&quot;){a=Ext.id(a)}Ext.EventManager.on(a,&quot;mousedown&quot;,this.handleMouseDown,this);this.setHandleElId(a);this.hasOuterHandles=true},unreg:function(){Ext.EventManager.un(this.id,&quot;mousedown&quot;,this.handleMouseDown,this);this._domRef=null;this.DDMInstance._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDMInstance.isLocked()||this.locked)},handleMouseDown:function(c,b){if(this.primaryButtonOnly&amp;&amp;c.button!=0){return}if(this.isLocked()){return}this.DDMInstance.refreshCache(this.groups);var a=c.getPoint();if(!this.hasOuterHandles&amp;&amp;!this.DDMInstance.isOverTarget(a,this)){}else{if(this.clickValidator(c)){this.setStartPosition();this.b4MouseDown(c);this.onMouseDown(c);this.DDMInstance.handleMouseDown(c,this);this.DDMInstance.stopEvent(c)}else{}}},clickValidator:function(b){var a=b.getTarget();return(this.isValidHandleChild(a)&amp;&amp;(this.id==this.handleElId||this.DDMInstance.handleWasClicked(a,this.id)))},addInvalidHandleType:function(a){var b=a.toUpperCase();this.invalidHandleTypes[b]=b},addInvalidHandleId:function(a){if(typeof a!==&quot;string&quot;){a=Ext.id(a)}this.invalidHandleIds[a]=a},addInvalidHandleClass:function(a){this.invalidHandleClasses.push(a)},removeInvalidHandleType:function(a){var b=a.toUpperCase();delete this.invalidHandleTypes[b]},removeInvalidHandleId:function(a){if(typeof a!==&quot;string&quot;){a=Ext.id(a)}delete this.invalidHandleIds[a]},removeInvalidHandleClass:function(b){for(var c=0,a=this.invalidHandleClasses.length;c&lt;a;++c){if(this.invalidHandleClasses[c]==b){delete this.invalidHandleClasses[c]}}},isValidHandleChild:function(d){var c=true;var g;try{g=d.nodeName.toUpperCase()}catch(f){g=d.nodeName}c=c&amp;&amp;!this.invalidHandleTypes[g];c=c&amp;&amp;!this.invalidHandleIds[d.id];for(var b=0,a=this.invalidHandleClasses.length;c&amp;&amp;b&lt;a;++b){c=!Ext.fly(d).hasCls(this.invalidHandleClasses[b])}return c},setXTicks:function(d,a){this.xTicks=[];this.xTickSize=a;var c={};for(var b=this.initPageX;b&gt;=this.minX;b=b-a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}for(b=this.initPageX;b&lt;=this.maxX;b=b+a){if(!c[b]){this.xTicks[this.xTicks.length]=b;c[b]=true}}Ext.Array.sort(this.xTicks,this.DDMInstance.numericSort)},setYTicks:function(d,a){this.yTicks=[];this.yTickSize=a;var c={};for(var b=this.initPageY;b&gt;=this.minY;b=b-a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}for(b=this.initPageY;b&lt;=this.maxY;b=b+a){if(!c[b]){this.yTicks[this.yTicks.length]=b;c[b]=true}}Ext.Array.sort(this.yTicks,this.DDMInstance.numericSort)},setXConstraint:function(c,b,a){this.leftConstraint=c;this.rightConstraint=b;this.minX=this.initPageX-c;this.maxX=this.initPageX+b;if(a){this.setXTicks(this.initPageX,a)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(a,c,b){this.topConstraint=a;this.bottomConstraint=c;this.minY=this.initPageY-a;this.maxY=this.initPageY+c;if(b){this.setYTicks(this.initPageY,b)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var b=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var a=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(b,a)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(g,d){if(!d){return g}else{if(d[0]&gt;=g){return d[0]}else{for(var b=0,a=d.length;b&lt;a;++b){var c=b+1;if(d[c]&amp;&amp;d[c]&gt;=g){var f=g-d[b];var e=d[c]-g;return(e&gt;f)?d[b]:d[c]}}return d[d.length-1]}}},toString:function(){return(&quot;DragDrop &quot;+this.id)}});Ext.define(&quot;Ext.dd.DD&quot;,{extend:&quot;Ext.dd.DragDrop&quot;,requires:[&quot;Ext.dd.DragDropManager&quot;],constructor:function(c,a,b){if(c){this.init(c,a,b)}},scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(b,e,c){var f=this.getTargetCoord(e,c),d=b.dom?b:Ext.fly(b,&quot;_dd&quot;),k=d.getSize(),h=Ext.Element,i;if(!this.deltaSetXY){i=this.cachedViewportSize={width:h.getDocumentWidth(),height:h.getDocumentHeight()};var a=[Math.max(0,Math.min(f.x,i.width-k.width)),Math.max(0,Math.min(f.y,i.height-k.height))];d.setXY(a);var j=d.getLeft(true);var g=d.getTop(true);this.deltaSetXY=[j-f.x,g-f.y]}else{i=this.cachedViewportSize;d.setLeftTop(Math.max(0,Math.min(f.x+this.deltaSetXY[0],i.width-k.width)),Math.max(0,Math.min(f.y+this.deltaSetXY[1],i.height-k.height)))}this.cachePosition(f.x,f.y);this.autoScroll(f.x,f.y,b.offsetHeight,b.offsetWidth);return f},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.Element.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(k,j,e,l){if(this.scroll){var m=Ext.Element.getViewHeight();var b=Ext.Element.getViewWidth();var o=this.DDMInstance.getScrollTop();var d=this.DDMInstance.getScrollLeft();var i=e+j;var n=l+k;var g=(m+o-j-this.deltaY);var f=(b+d-k-this.deltaX);var c=40;var a=(document.all)?80:30;if(i&gt;m&amp;&amp;g&lt;c){window.scrollTo(d,o+a)}if(j&lt;o&amp;&amp;o&gt;0&amp;&amp;j-o&lt;c){window.scrollTo(d,o-a)}if(n&gt;b&amp;&amp;f&lt;c){window.scrollTo(d+a,o)}if(k&lt;d&amp;&amp;d&gt;0&amp;&amp;k-d&lt;c){window.scrollTo(d-a,o)}}},getTargetCoord:function(c,b){var a=c-this.deltaX;var d=b-this.deltaY;if(this.constrainX){if(a&lt;this.minX){a=this.minX}if(a&gt;this.maxX){a=this.maxX}}if(this.constrainY){if(d&lt;this.minY){d=this.minY}if(d&gt;this.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){this.callParent();this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return(&quot;DD &quot;+this.id)}});Ext.define(&quot;Ext.dd.DDProxy&quot;,{extend:&quot;Ext.dd.DD&quot;,statics:{dragElId:&quot;ygddfdiv&quot;},constructor:function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}},resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement(&quot;div&quot;);d.id=this.dragElId;var c=d.style;c.position=&quot;absolute&quot;;c.visibility=&quot;hidden&quot;;c.cursor=&quot;move&quot;;c.border=&quot;2px solid #aaa&quot;;c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){this.callParent();this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility=&quot;&quot;;this.beforeMove();b.style.visibility=&quot;hidden&quot;;Ext.dd.DDM.moveToEl(b,a);a.style.visibility=&quot;hidden&quot;;b.style.visibility=&quot;&quot;;this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return(&quot;DDProxy &quot;+this.id)}});Ext.define(&quot;Ext.dd.DragSource&quot;,{extend:&quot;Ext.dd.DDProxy&quot;,requires:[&quot;Ext.dd.StatusProxy&quot;,&quot;Ext.dd.DragDropManager&quot;],dropAllowed:Ext.baseCSSPrefix+&quot;dd-drop-ok&quot;,dropNotAllowed:Ext.baseCSSPrefix+&quot;dd-drop-nodrop&quot;,animRepair:true,repairHighlightColor:&quot;c3daf9&quot;,constructor:function(b,a){this.el=Ext.get(b);if(!this.dragData){this.dragData={}}Ext.apply(this,a);if(!this.proxy){this.proxy=Ext.create(&quot;Ext.dd.StatusProxy&quot;,{animRepair:this.animRepair})}this.callParent([this.el.dom,this.ddGroup||this.group,{dragElId:this.proxy.id,resizeFrame:false,isTarget:false,scroll:this.scroll===true}]);this.dragging=false},getDragData:function(a){return this.dragData},onDragEnter:function(c,d){var b=Ext.dd.DragDropManager.getDDById(d);this.cachedTarget=b;if(this.beforeDragEnter(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyEnter(this,c,this.dragData);this.proxy.setStatus(a)}else{this.proxy.setStatus(this.dropAllowed)}if(this.afterDragEnter){this.afterDragEnter(b,c,d)}}},beforeDragEnter:function(b,a,c){return true},alignElWithMouse:function(){this.callParent(arguments);this.proxy.sync()},onDragOver:function(c,d){var b=this.cachedTarget||Ext.dd.DragDropManager.getDDById(d);if(this.beforeDragOver(b,c,d)!==false){if(b.isNotifyTarget){var a=b.notifyOver(this,c,this.dragData);this.proxy.setStatus(a)}if(this.afterDragOver){this.afterDragOver(b,c,d)}}},beforeDragOver:function(b,a,c){return true},onDragOut:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragOut(a,b,c)!==false){if(a.isNotifyTarget){a.notifyOut(this,b,this.dragData)}this.proxy.reset();if(this.afterDragOut){this.afterDragOut(a,b,c)}}this.cachedTarget=null},beforeDragOut:function(b,a,c){return true},onDragDrop:function(b,c){var a=this.cachedTarget||Ext.dd.DragDropManager.getDDById(c);if(this.beforeDragDrop(a,b,c)!==false){if(a.isNotifyTarget){if(a.notifyDrop(this,b,this.dragData)!==false){this.onValidDrop(a,b,c)}else{this.onInvalidDrop(a,b,c)}}else{this.onValidDrop(a,b,c)}if(this.afterDragDrop){this.afterDragDrop(a,b,c)}}delete this.cachedTarget},beforeDragDrop:function(b,a,c){return true},onValidDrop:function(b,a,c){this.hideProxy();if(this.afterValidDrop){this.afterValidDrop(b,a,c)}},getRepairXY:function(b,a){return this.el.getXY()},onInvalidDrop:function(b,a,c){this.beforeInvalidDrop(b,a,c);if(this.cachedTarget){if(this.cachedTarget.isNotifyTarget){this.cachedTarget.notifyOut(this,a,this.dragData)}this.cacheTarget=null}this.proxy.repair(this.getRepairXY(a,this.dragData),this.afterRepair,this);if(this.afterInvalidDrop){this.afterInvalidDrop(a,c)}},afterRepair:function(){var a=this;if(Ext.enableFx){a.el.highlight(a.repairHighlightColor)}a.dragging=false},beforeInvalidDrop:function(b,a,c){return true},handleMouseDown:function(b){if(this.dragging){return}var a=this.getDragData(b);if(a&amp;&amp;this.onBeforeDrag(a,b)!==false){this.dragData=a;this.proxy.stop();this.callParent(arguments)}},onBeforeDrag:function(a,b){return true},onStartDrag:Ext.emptyFn,startDrag:function(a,b){this.proxy.reset();this.dragging=true;this.proxy.update(&quot;&quot;);this.onInitDrag(a,b);this.proxy.show()},onInitDrag:function(a,c){var b=this.el.dom.cloneNode(true);b.id=Ext.id();this.proxy.update(b);this.onStartDrag(a,c);return true},getProxy:function(){return this.proxy},hideProxy:function(){this.proxy.hide();this.proxy.reset(true);this.dragging=false},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)},b4EndDrag:function(a){},endDrag:function(a){this.onEndDrag(this.dragData,a)},onEndDrag:function(a,b){},autoOffset:function(a,b){this.setDelta(-12,-20)},destroy:function(){this.callParent();Ext.destroy(this.proxy)}});Ext.define(&quot;Ext.panel.DD&quot;,{extend:&quot;Ext.dd.DragSource&quot;,requires:[&quot;Ext.panel.Proxy&quot;],constructor:function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=Ext.create(&quot;Ext.panel.Proxy&quot;,b,a);this.callParent([b.el,a]);Ext.defer(function(){var d=b.header,c=b.body;if(d){this.setHandleElId(d.id);c=d.el}c.setStyle(&quot;cursor&quot;,&quot;move&quot;);this.scroll=false},200,this)},showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX(),c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.el.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.define(&quot;Ext.state.Manager&quot;,{singleton:true,requires:[&quot;Ext.state.Provider&quot;],constructor:function(){this.provider=Ext.create(&quot;Ext.state.Provider&quot;)},setProvider:function(a){this.provider=a},get:function(b,a){return this.provider.get(b,a)},set:function(a,b){this.provider.set(a,b)},clear:function(a){this.provider.clear(a)},getProvider:function(){return this.provider}});Ext.define(&quot;Ext.state.Stateful&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},requires:[&quot;Ext.state.Manager&quot;],stateful:true,saveDelay:100,autoGenIdRe:/^((\w+-)|(ext-comp-))\d{4,}$/i,constructor:function(a){var b=this;a=a||{};if(Ext.isDefined(a.stateful)){b.stateful=a.stateful}if(Ext.isDefined(a.saveDelay)){b.saveDelay=a.saveDelay}b.stateId=b.stateId||a.stateId;if(!b.stateEvents){b.stateEvents=[]}if(a.stateEvents){b.stateEvents.concat(a.stateEvents)}this.addEvents(&quot;beforestaterestore&quot;,&quot;staterestore&quot;,&quot;beforestatesave&quot;,&quot;statesave&quot;);b.mixins.observable.constructor.call(b);if(b.stateful!==false){b.initStateEvents();b.initState()}},initStateEvents:function(){this.addStateEvents(this.stateEvents)},addStateEvents:function(c){if(!Ext.isArray(c)){c=[c]}var d=this,b=0,a=c.length;for(;b&lt;a;++b){d.on(c[b],d.onStateChange,d)}},onStateChange:function(){var b=this,a=b.saveDelay;if(a&gt;0){if(!b.stateTask){b.stateTask=Ext.create(&quot;Ext.util.DelayedTask&quot;,b.saveState,b)}b.stateTask.delay(b.saveDelay)}else{b.saveState()}},saveState:function(){var a=this,c,b;if(a.stateful!==false){c=a.getStateId();if(c){b=a.getState();if(a.fireEvent(&quot;beforestatesave&quot;,a,b)!==false){Ext.state.Manager.set(c,b);a.fireEvent(&quot;statesave&quot;,a,b)}}}},getState:function(){return null},applyState:function(a){if(a){Ext.apply(this,a)}},getStateId:function(){var a=this,b=a.stateId;if(!b){b=a.autoGenIdRe.test(String(a.id))?null:a.id}return b},initState:function(){var a=this,c=a.getStateId(),b;if(a.stateful!==false){if(c){b=Ext.state.Manager.get(c);if(b){b=Ext.apply({},b);if(a.fireEvent(&quot;beforestaterestore&quot;,a,b)!==false){a.applyState(b);a.fireEvent(&quot;staterestore&quot;,a,b)}}}}},savePropToState:function(f,e,d){var b=this,c=b[f],a=b.initialConfig;if(b.hasOwnProperty(f)){if(!a||a[f]!==c){if(e){e[d||f]=c}return true}}return false},savePropsToState:function(c,b){var a=this;Ext.each(c,function(d){a.savePropToState(d,b)});return b},destroy:function(){var a=this.stateTask;if(a){a.cancel()}this.clearListeners()}});Ext.define(&quot;Ext.AbstractComponent&quot;,{requires:[&quot;Ext.ComponentQuery&quot;,&quot;Ext.ComponentManager&quot;],mixins:{observable:&quot;Ext.util.Observable&quot;,animate:&quot;Ext.util.Animate&quot;,state:&quot;Ext.state.Stateful&quot;},uses:[&quot;Ext.PluginManager&quot;,&quot;Ext.ComponentManager&quot;,&quot;Ext.Element&quot;,&quot;Ext.DomHelper&quot;,&quot;Ext.XTemplate&quot;,&quot;Ext.ComponentQuery&quot;,&quot;Ext.ComponentLoader&quot;,&quot;Ext.EventManager&quot;,&quot;Ext.layout.Layout&quot;,&quot;Ext.layout.component.Auto&quot;,&quot;Ext.LoadMask&quot;,&quot;Ext.ZIndexManager&quot;],statics:{AUTO_ID:1000},isComponent:true,getAutoId:function(){return ++Ext.AbstractComponent.AUTO_ID},renderTpl:null,tplWriteMode:&quot;overwrite&quot;,baseCls:Ext.baseCSSPrefix+&quot;component&quot;,disabledCls:Ext.baseCSSPrefix+&quot;item-disabled&quot;,ui:&quot;default&quot;,uiCls:[],hidden:false,disabled:false,draggable:false,floating:false,hideMode:&quot;display&quot;,styleHtmlContent:false,styleHtmlCls:Ext.baseCSSPrefix+&quot;html&quot;,autoShow:false,autoRender:false,needsLayout:false,allowDomMove:true,rendered:false,componentLayoutCounter:0,weight:0,trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,maskOnDisable:true,constructor:function(b){var d=this,c,a;b=b||{};d.initialConfig=b;Ext.apply(d,b);d.addEvents(&quot;beforeactivate&quot;,&quot;activate&quot;,&quot;beforedeactivate&quot;,&quot;deactivate&quot;,&quot;added&quot;,&quot;disable&quot;,&quot;enable&quot;,&quot;beforeshow&quot;,&quot;show&quot;,&quot;beforehide&quot;,&quot;hide&quot;,&quot;removed&quot;,&quot;beforerender&quot;,&quot;render&quot;,&quot;afterrender&quot;,&quot;beforedestroy&quot;,&quot;destroy&quot;,&quot;resize&quot;,&quot;move&quot;);d.getId();d.mons=[];d.additionalCls=[];d.renderData=d.renderData||{};d.renderSelectors=d.renderSelectors||{};if(d.plugins){d.plugins=[].concat(d.plugins);d.constructPlugins()}d.initComponent();Ext.ComponentManager.register(d);d.mixins.observable.constructor.call(d);d.mixins.state.constructor.call(d,b);this.addStateEvents(&quot;resize&quot;);if(d.plugins){d.plugins=[].concat(d.plugins);for(c=0,a=d.plugins.length;c&lt;a;c++){d.plugins[c]=d.initPlugin(d.plugins[c])}}d.loader=d.getLoader();if(d.renderTo){d.render(d.renderTo)}if(d.autoShow){d.show()}},initComponent:function(){this.constructPlugins()},getState:function(){var f=this,e=f.ownerCt?(f.shadowOwnerCt||f.ownerCt).getLayout():null,g={collapsed:f.collapsed},c=f.width,b=f.height,a=f.collapseMemento,d;if(f.collapsed&amp;&amp;a){if(Ext.isDefined(a.data.width)){c=a.width}if(Ext.isDefined(a.data.height)){b=a.height}}if(e&amp;&amp;f.flex){g.flex=f.flex;if(e.perpendicularPrefix){g[e.perpendicularPrefix]=f[&quot;get&quot;+e.perpendicularPrefixCap]()}else{}}else{if(e&amp;&amp;f.anchor){g.anchor=f.anchor;d=f.anchor.split(&quot; &quot;).concat(null);if(!d[0]){if(f.width){g.width=c}}if(!d[1]){if(f.height){g.height=b}}}else{if(f.width){g.width=c}if(f.height){g.height=b}}}if(g.width==f.initialConfig.width){delete g.width}if(g.height==f.initialConfig.height){delete g.height}if(e&amp;&amp;e.align&amp;&amp;(e.align.indexOf(&quot;stretch&quot;)!==-1)){delete g[e.perpendicularPrefix]}return g},show:Ext.emptyFn,animate:function(b){var f=this,j;b=b||{};j=b.to||{};if(Ext.fx.Manager.hasFxBlock(f.id)){return f}if(!b.dynamic&amp;&amp;(j.height||j.width)){var e=f.getWidth(),k=e,d=f.getHeight(),c=d,a=false;if(j.height&amp;&amp;j.height&gt;d){c=j.height;a=true}if(j.width&amp;&amp;j.width&gt;e){k=j.width;a=true}if(a){var i=!Ext.isNumber(f.width),g=!Ext.isNumber(f.height);f.componentLayout.childrenChanged=true;f.setSize(k,c,f.ownerCt);f.el.setSize(e,d);if(i){delete f.width}if(g){delete f.height}}}return f.mixins.animate.animate.apply(f,arguments)},findLayoutController:function(){return this.findParentBy(function(a){return !a.ownerCt||(a.layout.layoutBusy&amp;&amp;!a.ownerCt.layout.layoutBusy)})},onShow:function(){var a=this.needsLayout;if(Ext.isObject(a)){this.doComponentLayout(a.width,a.height,a.isSetSize,a.ownerCt)}},constructPlugin:function(a){if(a.ptype&amp;&amp;typeof a.init!=&quot;function&quot;){a.cmp=this;a=Ext.PluginManager.create(a)}else{if(typeof a==&quot;string&quot;){a=Ext.PluginManager.create({ptype:a,cmp:this})}}return a},constructPlugins:function(){var d=this,b=d.plugins,c,a;if(b){for(c=0,a=b.length;c&lt;a;c++){b[c]=d.constructPlugin(b[c])}}},initPlugin:function(a){a.init(this);return a},doAutoRender:function(){var a=this;if(a.floating){a.render(document.body)}else{a.render(Ext.isBoolean(a.autoRender)?Ext.getBody():a.autoRender)}},render:function(b,a){var c=this;if(!c.rendered&amp;&amp;c.fireEvent(&quot;beforerender&quot;,c)!==false){c.rendering=true;if(c.el){c.el=Ext.get(c.el)}if(c.floating){c.onFloatRender()}b=c.initContainer(b);c.onRender(b,a);c.el.setVisibilityMode(Ext.Element[c.hideMode.toUpperCase()]);if(c.overCls){c.el.hover(c.addOverCls,c.removeOverCls,c)}c.fireEvent(&quot;render&quot;,c);c.initContent();c.afterRender(b);c.fireEvent(&quot;afterrender&quot;,c);c.initEvents();if(c.hidden){c.el.hide()}if(c.disabled){c.disable(true)}delete c.rendering}return c},onRender:function(b,a){var f=this,d=f.el,e=f.initStyles(),h,g,c;a=f.getInsertPosition(a);if(!d){if(a){d=Ext.DomHelper.insertBefore(a,f.getElConfig(),true)}else{d=Ext.DomHelper.append(b,f.getElConfig(),true)}}else{if(f.allowDomMove!==false){if(a){b.dom.insertBefore(d.dom,a)}else{b.dom.appendChild(d.dom)}}}if(Ext.scopeResetCSS&amp;&amp;!f.ownerCt){if(d.dom==Ext.getBody().dom){d.parent().addCls(Ext.baseCSSPrefix+&quot;reset&quot;)}else{f.resetEl=d.wrap({cls:Ext.baseCSSPrefix+&quot;reset&quot;})}}f.setUI(f.ui);d.addCls(f.initCls());d.setStyle(e);f.el=d;f.initFrame();h=f.initRenderTpl();if(h){g=f.initRenderData();h.append(f.getTargetEl(),g)}f.applyRenderSelectors();f.rendered=true},afterRender:function(){var a=this,c,b;a.getComponentLayout();if(a.collapsed||(!a.ownerCt||(a.height||a.width))){a.setSize(a.width,a.height)}else{a.renderChildren()}if(a.floating&amp;&amp;(a.x===undefined||a.y===undefined)){if(a.floatParent){b=a.el.getAlignToXY(a.floatParent.getTargetEl(),&quot;c-c&quot;);c=a.floatParent.getTargetEl().translatePoints(b[0],b[1])}else{b=a.el.getAlignToXY(a.container,&quot;c-c&quot;);c=a.container.translatePoints(b[0],b[1])}a.x=a.x===undefined?c.left:a.x;a.y=a.y===undefined?c.top:a.y}if(Ext.isDefined(a.x)||Ext.isDefined(a.y)){a.setPosition(a.x,a.y)}if(a.styleHtmlContent){a.getTargetEl().addCls(a.styleHtmlCls)}},registerFloatingItem:function(b){var a=this;if(!a.floatingItems){a.floatingItems=Ext.create(&quot;Ext.ZIndexManager&quot;,a)}a.floatingItems.register(b)},renderChildren:function(){var b=this,a=b.getComponentLayout();b.suspendLayout=true;a.renderChildren();delete b.suspendLayout},frameCls:Ext.baseCSSPrefix+&quot;frame&quot;,frameIdRegex:/[-]frame\d+[TMB][LCR]$/,frameElementCls:{tl:[],tc:[],tr:[],ml:[],mc:[],mr:[],bl:[],bc:[],br:[]},frameTpl:['&lt;tpl if=&quot;top&quot;&gt;','&lt;tpl if=&quot;left&quot;&gt;&lt;div id=&quot;{fgid}TL&quot; class=&quot;{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-tl&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {tl}; padding-left: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/tpl&gt;','&lt;tpl if=&quot;right&quot;&gt;&lt;div id=&quot;{fgid}TR&quot; class=&quot;{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-tr&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {tr}; padding-right: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/tpl&gt;','&lt;div id=&quot;{fgid}TC&quot; class=&quot;{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-tc&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {tc}; height: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;','&lt;tpl if=&quot;right&quot;&gt;&lt;/div&gt;&lt;/tpl&gt;','&lt;tpl if=&quot;left&quot;&gt;&lt;/div&gt;&lt;/tpl&gt;',&quot;&lt;/tpl&gt;&quot;,'&lt;tpl if=&quot;left&quot;&gt;&lt;div id=&quot;{fgid}ML&quot; class=&quot;{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-ml&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {ml}; padding-left: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/tpl&gt;','&lt;tpl if=&quot;right&quot;&gt;&lt;div id=&quot;{fgid}MR&quot; class=&quot;{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-mr&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {mr}; padding-right: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/tpl&gt;','&lt;div id=&quot;{fgid}MC&quot; class=&quot;{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-mc&lt;/tpl&gt;&lt;/tpl&gt;&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;','&lt;tpl if=&quot;right&quot;&gt;&lt;/div&gt;&lt;/tpl&gt;','&lt;tpl if=&quot;left&quot;&gt;&lt;/div&gt;&lt;/tpl&gt;','&lt;tpl if=&quot;bottom&quot;&gt;','&lt;tpl if=&quot;left&quot;&gt;&lt;div id=&quot;{fgid}BL&quot; class=&quot;{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-bl&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {bl}; padding-left: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/tpl&gt;','&lt;tpl if=&quot;right&quot;&gt;&lt;div id=&quot;{fgid}BR&quot; class=&quot;{frameCls}-br {baseCls}-br {baseCls}-{ui}-br&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-br&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {br}; padding-right: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/tpl&gt;','&lt;div id=&quot;{fgid}BC&quot; class=&quot;{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-bc&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {bc}; height: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;','&lt;tpl if=&quot;right&quot;&gt;&lt;/div&gt;&lt;/tpl&gt;','&lt;tpl if=&quot;left&quot;&gt;&lt;/div&gt;&lt;/tpl&gt;',&quot;&lt;/tpl&gt;&quot;],frameTableTpl:[&quot;&lt;table&gt;&lt;tbody&gt;&quot;,'&lt;tpl if=&quot;top&quot;&gt;',&quot;&lt;tr&gt;&quot;,'&lt;tpl if=&quot;left&quot;&gt;&lt;td id=&quot;{fgid}TL&quot; class=&quot;{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-tl&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {tl}; padding-left:{frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/td&gt;&lt;/tpl&gt;','&lt;td id=&quot;{fgid}TC&quot; class=&quot;{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-tc&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {tc}; height: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/td&gt;','&lt;tpl if=&quot;right&quot;&gt;&lt;td id=&quot;{fgid}TR&quot; class=&quot;{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-tr&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {tr}; padding-left: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/td&gt;&lt;/tpl&gt;',&quot;&lt;/tr&gt;&quot;,&quot;&lt;/tpl&gt;&quot;,&quot;&lt;tr&gt;&quot;,'&lt;tpl if=&quot;left&quot;&gt;&lt;td id=&quot;{fgid}ML&quot; class=&quot;{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-ml&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {ml}; padding-left: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/td&gt;&lt;/tpl&gt;','&lt;td id=&quot;{fgid}MC&quot; class=&quot;{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-mc&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: 0 0;&quot; role=&quot;presentation&quot;&gt;&lt;/td&gt;','&lt;tpl if=&quot;right&quot;&gt;&lt;td id=&quot;{fgid}MR&quot; class=&quot;{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-mr&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {mr}; padding-left: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/td&gt;&lt;/tpl&gt;',&quot;&lt;/tr&gt;&quot;,'&lt;tpl if=&quot;bottom&quot;&gt;',&quot;&lt;tr&gt;&quot;,'&lt;tpl if=&quot;left&quot;&gt;&lt;td id=&quot;{fgid}BL&quot; class=&quot;{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-bl&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {bl}; padding-left: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/td&gt;&lt;/tpl&gt;','&lt;td id=&quot;{fgid}BC&quot; class=&quot;{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-bc&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {bc}; height: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/td&gt;','&lt;tpl if=&quot;right&quot;&gt;&lt;td id=&quot;{fgid}BR&quot; class=&quot;{frameCls}-br {baseCls}-br {baseCls}-{ui}-br&lt;tpl if=&quot;uiCls&quot;&gt;&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-{parent.ui}-{.}-br&lt;/tpl&gt;&lt;/tpl&gt;&quot; style=&quot;background-position: {br}; padding-left: {frameWidth}px&quot; role=&quot;presentation&quot;&gt;&lt;/td&gt;&lt;/tpl&gt;',&quot;&lt;/tr&gt;&quot;,&quot;&lt;/tpl&gt;&quot;,&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;],initFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,d=e.getFrameInfo(),b=d.width,a=e.getFrameTpl(d.table),c;if(e.frame){e.frameGenId=c=(e.frameGenId||0)+1;c=e.id+&quot;-frame&quot;+c;a.insertFirst(e.el,Ext.apply({},{fgid:c,ui:e.ui,uiCls:e.uiCls,frameCls:e.frameCls,baseCls:e.baseCls,frameWidth:b,top:!!d.top,left:!!d.left,right:!!d.right,bottom:!!d.bottom},e.getFramePositions(d)));e.frameBody=e.el.down(&quot;.&quot;+e.frameCls+&quot;-mc&quot;);e.removeChildEls(function(f){return f.id&amp;&amp;e.frameIdRegex.test(f.id)});Ext.each([&quot;TL&quot;,&quot;TC&quot;,&quot;TR&quot;,&quot;ML&quot;,&quot;MC&quot;,&quot;MR&quot;,&quot;BL&quot;,&quot;BC&quot;,&quot;BR&quot;],function(f){e.childEls.push({name:&quot;frame&quot;+f,id:c+f})})}},updateFrame:function(){if(Ext.supports.CSS3BorderRadius){return false}var e=this,g=this.frameSize&amp;&amp;this.frameSize.table,f=this.frameTL,d=this.frameBL,c=this.frameML,a=this.frameMC,b;this.initFrame();if(a){if(e.frame){delete e.frameTL;delete e.frameTC;delete e.frameTR;delete e.frameML;delete e.frameMC;delete e.frameMR;delete e.frameBL;delete e.frameBC;delete e.frameBR;this.applyRenderSelectors();b=this.frameMC.dom.className;a.insertAfter(this.frameMC);this.frameMC.remove();this.frameBody=this.frameMC=a;a.dom.className=b;if(g){e.el.query(&quot;&gt; table&quot;)[1].remove()}else{if(f){f.remove()}if(d){d.remove()}c.remove()}}else{}}else{if(e.frame){this.applyRenderSelectors()}}},getFrameInfo:function(){if(Ext.supports.CSS3BorderRadius){return false}var c=this,f=c.el.getStyle(&quot;background-position-x&quot;),e=c.el.getStyle(&quot;background-position-y&quot;),d,b=false,a;if(!f&amp;&amp;!e){d=c.el.getStyle(&quot;background-position&quot;).split(&quot; &quot;);f=d[0];e=d[1]}if(parseInt(f,10)&gt;=1000000&amp;&amp;parseInt(e,10)&gt;=1000000){a=Math.max;b={table:f.substr(0,3)==&quot;110&quot;,vertical:e.substr(0,3)==&quot;110&quot;,top:a(f.substr(3,2),f.substr(5,2)),right:a(f.substr(5,2),e.substr(3,2)),bottom:a(e.substr(3,2),e.substr(5,2)),left:a(e.substr(5,2),f.substr(3,2))};b.width=a(b.top,b.right,b.bottom,b.left);c.el.setStyle(&quot;background-image&quot;,&quot;none&quot;)}if(c.frame===true&amp;&amp;!b){}c.frame=c.frame||!!b;c.frameSize=b||false;return b},getFramePositions:function(e){var g=this,h=e.width,i=g.dock,d,b,f,c,a;if(e.vertical){b=&quot;0 -&quot;+(h*0)+&quot;px&quot;;f=&quot;0 -&quot;+(h*1)+&quot;px&quot;;if(i&amp;&amp;i==&quot;right&quot;){b=&quot;right -&quot;+(h*0)+&quot;px&quot;;f=&quot;right -&quot;+(h*1)+&quot;px&quot;}d={tl:&quot;0 -&quot;+(h*0)+&quot;px&quot;,tr:&quot;0 -&quot;+(h*1)+&quot;px&quot;,bl:&quot;0 -&quot;+(h*2)+&quot;px&quot;,br:&quot;0 -&quot;+(h*3)+&quot;px&quot;,ml:&quot;-&quot;+(h*1)+&quot;px 0&quot;,mr:&quot;right 0&quot;,tc:b,bc:f}}else{c=&quot;-&quot;+(h*0)+&quot;px 0&quot;;a=&quot;right 0&quot;;if(i&amp;&amp;i==&quot;bottom&quot;){c=&quot;left bottom&quot;;a=&quot;right bottom&quot;}d={tl:&quot;0 -&quot;+(h*2)+&quot;px&quot;,tr:&quot;right -&quot;+(h*3)+&quot;px&quot;,bl:&quot;0 -&quot;+(h*4)+&quot;px&quot;,br:&quot;right -&quot;+(h*5)+&quot;px&quot;,ml:c,mr:a,tc:&quot;0 -&quot;+(h*0)+&quot;px&quot;,bc:&quot;0 -&quot;+(h*1)+&quot;px&quot;}}return d},getFrameTpl:function(a){return a?this.getTpl(&quot;frameTableTpl&quot;):this.getTpl(&quot;frameTpl&quot;)},initCls:function(){var b=this,a=[];a.push(b.baseCls);if(Ext.isDefined(b.cmpCls)){if(Ext.isDefined(Ext.global.console)){Ext.global.console.warn(&quot;Ext.Component: cmpCls has been deprecated. Please use componentCls.&quot;)}b.componentCls=b.cmpCls;delete b.cmpCls}if(b.componentCls){a.push(b.componentCls)}else{b.componentCls=b.baseCls}if(b.cls){a.push(b.cls);delete b.cls}return a.concat(b.additionalCls)},setUI:function(f){var e=this,b=Ext.Array.clone(e.uiCls),g=[],d=[],a,c;for(c=0;c&lt;b.length;c++){a=b[c];d=d.concat(e.removeClsWithUI(a,true));g.push(a)}if(d.length){e.removeCls(d)}e.removeUIFromElement();e.ui=f;e.addUIToElement();d=[];for(c=0;c&lt;g.length;c++){a=g[c];d=d.concat(e.addClsWithUI(a,true))}if(d.length){e.addCls(d)}},addClsWithUI:function(a,e){var d=this,c=[],b;if(!Ext.isArray(a)){a=[a]}for(b=0;b&lt;a.length;b++){if(a[b]&amp;&amp;!d.hasUICls(a[b])){d.uiCls=Ext.Array.clone(d.uiCls);d.uiCls.push(a[b]);c=c.concat(d.addUIClsToElement(a[b]))}}if(e!==true){d.addCls(c)}return c},removeClsWithUI:function(a,e){var d=this,c=[],b;if(!Ext.isArray(a)){a=[a]}for(b=0;b&lt;a.length;b++){if(a[b]&amp;&amp;d.hasUICls(a[b])){d.uiCls=Ext.Array.remove(d.uiCls,a[b]);c=c.concat(d.removeUIClsFromElement(a[b]))}}if(e!==true){d.removeCls(c)}return c},hasUICls:function(a){var b=this,c=b.uiCls||[];return Ext.Array.contains(c,a)},addUIClsToElement:function(k,a){var g=this,l=[],h=g.frameElementCls;l.push(Ext.baseCSSPrefix+k);l.push(g.baseCls+&quot;-&quot;+k);l.push(g.baseCls+&quot;-&quot;+g.ui+&quot;-&quot;+k);if(!a&amp;&amp;g.frame&amp;&amp;!Ext.supports.CSS3BorderRadius){var e=[&quot;tl&quot;,&quot;tc&quot;,&quot;tr&quot;,&quot;ml&quot;,&quot;mc&quot;,&quot;mr&quot;,&quot;bl&quot;,&quot;bc&quot;,&quot;br&quot;],c,f,d,b;for(f=0;f&lt;e.length;f++){b=g[&quot;frame&quot;+e[f].toUpperCase()];c=[g.baseCls+&quot;-&quot;+g.ui+&quot;-&quot;+e[f],g.baseCls+&quot;-&quot;+g.ui+&quot;-&quot;+k+&quot;-&quot;+e[f]];if(b&amp;&amp;b.dom){b.addCls(c)}else{for(d=0;d&lt;c.length;d++){if(Ext.Array.indexOf(h[e[f]],c[d])==-1){h[e[f]].push(c[d])}}}}}g.frameElementCls=h;return l},removeUIClsFromElement:function(b,h){var g=this,a=[],f=g.frameElementCls;a.push(Ext.baseCSSPrefix+b);a.push(g.baseCls+&quot;-&quot;+b);a.push(g.baseCls+&quot;-&quot;+g.ui+&quot;-&quot;+b);if(!h&amp;&amp;g.frame&amp;&amp;!Ext.supports.CSS3BorderRadius){var d=[&quot;tl&quot;,&quot;tc&quot;,&quot;tr&quot;,&quot;ml&quot;,&quot;mc&quot;,&quot;mr&quot;,&quot;bl&quot;,&quot;bc&quot;,&quot;br&quot;],c,e;b=g.baseCls+&quot;-&quot;+g.ui+&quot;-&quot;+b+&quot;-&quot;+d[c];for(c=0;c&lt;d.length;c++){e=g[&quot;frame&quot;+d[c].toUpperCase()];if(e&amp;&amp;e.dom){e.removeCls(b)}else{Ext.Array.remove(f[d[c]],b)}}}g.frameElementCls=f;return a},addUIToElement:function(g){var f=this,e=f.frameElementCls;f.addCls(f.baseCls+&quot;-&quot;+f.ui);if(f.frame&amp;&amp;!Ext.supports.CSS3BorderRadius){var c=[&quot;tl&quot;,&quot;tc&quot;,&quot;tr&quot;,&quot;ml&quot;,&quot;mc&quot;,&quot;mr&quot;,&quot;bl&quot;,&quot;bc&quot;,&quot;br&quot;],b,d,a;for(b=0;b&lt;c.length;b++){d=f[&quot;frame&quot;+c[b].toUpperCase()];a=f.baseCls+&quot;-&quot;+f.ui+&quot;-&quot;+c[b];if(d){d.addCls(a)}else{if(!Ext.Array.contains(e[c[b]],a)){e[c[b]].push(a)}}}}},removeUIFromElement:function(){var g=this,f=g.frameElementCls;g.removeCls(g.baseCls+&quot;-&quot;+g.ui);if(g.frame&amp;&amp;!Ext.supports.CSS3BorderRadius){var d=[&quot;tl&quot;,&quot;tc&quot;,&quot;tr&quot;,&quot;ml&quot;,&quot;mc&quot;,&quot;mr&quot;,&quot;bl&quot;,&quot;bc&quot;,&quot;br&quot;],c,b,e,a;for(c=0;c&lt;d.length;c++){e=g[&quot;frame&quot;+d[c].toUpperCase()];a=g.baseCls+&quot;-&quot;+g.ui+&quot;-&quot;+d[c];if(e){e.removeCls(a)}else{Ext.Array.remove(f[d[c]],a)}}}},getElConfig:function(){if(Ext.isString(this.autoEl)){this.autoEl={tag:this.autoEl}}var a=this.autoEl||{tag:&quot;div&quot;};a.id=this.id;return a},getInsertPosition:function(a){if(a!==undefined){if(Ext.isNumber(a)){a=this.container.dom.childNodes[a]}else{a=Ext.getDom(a)}}return a},initContainer:function(a){var b=this;if(!a&amp;&amp;b.el){a=b.el.dom.parentNode;b.allowDomMove=false}b.container=Ext.get(a);if(b.ctCls){b.container.addCls(b.ctCls)}return b.container},initRenderData:function(){var a=this;return Ext.applyIf(a.renderData,{id:a.id,ui:a.ui,uiCls:a.uiCls,baseCls:a.baseCls,componentCls:a.componentCls,frame:a.frame})},getTpl:function(c){var e=this,b=e.self.prototype,d,a;if(e.hasOwnProperty(c)){a=e[c];if(a&amp;&amp;!(a instanceof Ext.XTemplate)){e[c]=Ext.ClassManager.dynInstantiate(&quot;Ext.XTemplate&quot;,a)}return e[c]}if(!(b[c] instanceof Ext.XTemplate)){d=b;do{if(d.hasOwnProperty(c)){a=d[c];if(a&amp;&amp;!(a instanceof Ext.XTemplate)){d[c]=Ext.ClassManager.dynInstantiate(&quot;Ext.XTemplate&quot;,a);break}}d=d.superclass}while(d)}return b[c]},initRenderTpl:function(){return this.getTpl(&quot;renderTpl&quot;)},initStyles:function(){var b={},c=this,a=Ext.Element;if(Ext.isString(c.style)){b=a.parseStyles(c.style)}else{b=Ext.apply({},c.style)}if(c.padding!==undefined){b.padding=a.unitizeBox((c.padding===true)?5:c.padding)}if(c.margin!==undefined){b.margin=a.unitizeBox((c.margin===true)?5:c.margin)}delete c.style;return b},initContent:function(){var b=this,d=b.getTargetEl(),a,c;if(b.html){d.update(Ext.DomHelper.markup(b.html));delete b.html}if(b.contentEl){a=Ext.get(b.contentEl);c=Ext.baseCSSPrefix;a.removeCls([c+&quot;hidden&quot;,c+&quot;hide-display&quot;,c+&quot;hide-offsets&quot;,c+&quot;hide-nosize&quot;]);d.appendChild(a.dom)}if(b.tpl){if(!b.tpl.isTemplate){b.tpl=Ext.create(&quot;Ext.XTemplate&quot;,b.tpl)}if(b.data){b.tpl[b.tplWriteMode](d,b.data);delete b.data}}},initEvents:function(){var c=this,e=c.afterRenderEvents,b,d,a=function(f){c.mon(b,f)};if(e){for(d in e){if(e.hasOwnProperty(d)){b=c[d];if(b&amp;&amp;b.on){Ext.each(e[d],a)}}}}},addChildEls:function(){var b=this,a=b.childEls||(b.childEls=[]);a.push.apply(a,arguments)},removeChildEls:function(f){var e=this,a=e.childEls,d=(e.childEls=[]),g,b,c;for(b=0,g=a.length;b&lt;g;++b){c=a[b];if(!f(c)){d.push(c)}}},applyRenderSelectors:function(){var f=this,g=f.childEls,h=f.renderSelectors,a=f.el,d=a.dom,j,k,c,e,b;if(g){j=f.id+&quot;-&quot;;for(e=g.length;e--;){k=c=g[e];if(typeof(k)!=&quot;string&quot;){c=k.id||(j+k.itemId);k=k.name}else{c=j+c}f[k]=a.getById(c)}}if(h){for(b in h){if(h.hasOwnProperty(b)&amp;&amp;h[b]){f[b]=Ext.get(Ext.DomQuery.selectNode(h[b],d))}}}},is:function(a){return Ext.ComponentQuery.is(this,a)},up:function(b){var a=this.ownerCt;if(b){for(;a;a=a.ownerCt){if(Ext.ComponentQuery.is(a,b)){return a}}}return a},nextSibling:function(b){var f=this.ownerCt,d,e,a,g;if(f){d=f.items;a=d.indexOf(this)+1;if(a){if(b){for(e=d.getCount();a&lt;e;a++){if((g=d.getAt(a)).is(b)){return g}}}else{if(a&lt;d.getCount()){return d.getAt(a)}}}}return null},previousSibling:function(b){var e=this.ownerCt,d,a,f;if(e){d=e.items;a=d.indexOf(this);if(a!=-1){if(b){for(--a;a&gt;=0;a--){if((f=d.getAt(a)).is(b)){return f}}}else{if(a){return d.getAt(--a)}}}}return null},previousNode:function(c,d){var g=this,b,f,a,e;if(d&amp;&amp;g.is(c)){return g}b=this.prev(c);if(b){return b}if(g.ownerCt){for(f=g.ownerCt.items.items,e=Ext.Array.indexOf(f,g)-1;e&gt;-1;e--){if(f[e].query){b=f[e].query(c);b=b[b.length-1];if(b){return b}}}return g.ownerCt.previousNode(c,true)}},nextNode:function(c,d){var g=this,b,f,a,e;if(d&amp;&amp;g.is(c)){return g}b=this.next(c);if(b){return b}if(g.ownerCt){for(f=g.ownerCt.items,e=f.indexOf(g)+1,f=f.items,a=f.length;e&lt;a;e++){if(f[e].down){b=f[e].down(c);if(b){return b}}}return g.ownerCt.nextNode(c)}},getId:function(){return this.id||(this.id=&quot;ext-comp-&quot;+(this.getAutoId()))},getItemId:function(){return this.itemId||this.id},getEl:function(){return this.el},getTargetEl:function(){return this.frameBody||this.el},isXType:function(b,a){if(Ext.isFunction(b)){b=b.xtype}else{if(Ext.isObject(b)){b=b.statics().xtype}}return !a?(&quot;/&quot;+this.getXTypes()+&quot;/&quot;).indexOf(&quot;/&quot;+b+&quot;/&quot;)!=-1:this.self.xtype==b},getXTypes:function(){var c=this.self,d,b,a;if(!c.xtypes){d=[];b=this;while(b){a=b.xtypes;if(a!==undefined){d.unshift.apply(d,a)}b=b.superclass}c.xtypeChain=d;c.xtypes=d.join(&quot;/&quot;)}return c.xtypes},update:function(b,c,a){var d=this;if(d.tpl&amp;&amp;!Ext.isString(b)){d.data=b;if(d.rendered){d.tpl[d.tplWriteMode](d.getTargetEl(),b||{})}}else{d.html=Ext.isObject(b)?Ext.DomHelper.markup(b):b;if(d.rendered){d.getTargetEl().update(d.html,c,a)}}if(d.rendered){d.doComponentLayout()}},setVisible:function(a){return this[a?&quot;show&quot;:&quot;hide&quot;]()},isVisible:function(a){var c=this,e=c,d=!c.hidden,b=c.ownerCt;c.hiddenAncestor=false;if(c.destroyed){return false}if(a&amp;&amp;d&amp;&amp;c.rendered&amp;&amp;b){while(b){if(b.hidden||(b.collapsed&amp;&amp;!(b.getDockedItems&amp;&amp;Ext.Array.contains(b.getDockedItems(),e)))){c.hiddenAncestor=b;d=false;break}e=b;b=b.ownerCt}}return d},enable:function(a){var b=this;if(b.rendered){b.el.removeCls(b.disabledCls);b.el.dom.disabled=false;b.onEnable()}b.disabled=false;if(a!==true){b.fireEvent(&quot;enable&quot;,b)}return b},disable:function(a){var b=this;if(b.rendered){b.el.addCls(b.disabledCls);b.el.dom.disabled=true;b.onDisable()}b.disabled=true;if(a!==true){b.fireEvent(&quot;disable&quot;,b)}return b},onEnable:function(){if(this.maskOnDisable){this.el.unmask()}},onDisable:function(){if(this.maskOnDisable){this.el.mask()}},isDisabled:function(){return this.disabled},setDisabled:function(a){return this[a?&quot;disable&quot;:&quot;enable&quot;]()},isHidden:function(){return this.hidden},addCls:function(a){var b=this;if(!a){return b}if(!Ext.isArray(a)){a=a.replace(b.trimRe,&quot;&quot;).split(b.spacesRe)}if(b.rendered){b.el.addCls(a)}else{b.additionalCls=Ext.Array.unique(b.additionalCls.concat(a))}return b},addClass:function(){return this.addCls.apply(this,arguments)},removeCls:function(a){var b=this;if(!a){return b}if(!Ext.isArray(a)){a=a.replace(b.trimRe,&quot;&quot;).split(b.spacesRe)}if(b.rendered){b.el.removeCls(a)}else{if(b.additionalCls.length){Ext.each(a,function(c){Ext.Array.remove(b.additionalCls,c)})}}return b},addOverCls:function(){var a=this;if(!a.disabled){a.el.addCls(a.overCls)}},removeOverCls:function(){this.el.removeCls(this.overCls)},addListener:function(b,f,e,a){var g=this,d,c;if(Ext.isString(b)&amp;&amp;(Ext.isObject(f)||a&amp;&amp;a.element)){if(a.element){d=f;f={};f[b]=d;b=a.element;if(e){f.scope=e}for(c in a){if(a.hasOwnProperty(c)){if(g.eventOptionsRe.test(c)){f[c]=a[c]}}}}if(g[b]&amp;&amp;g[b].on){g.mon(g[b],f)}else{g.afterRenderEvents=g.afterRenderEvents||{};if(!g.afterRenderEvents[b]){g.afterRenderEvents[b]=[]}g.afterRenderEvents[b].push(f)}}return g.mixins.observable.addListener.apply(g,arguments)},removeManagedListenerItem:function(b,a,h,d,f,e){var g=this,c=a.options?a.options.element:null;if(c){c=g[c];if(c&amp;&amp;c.un){if(b||(a.item===h&amp;&amp;a.ename===d&amp;&amp;(!f||a.fn===f)&amp;&amp;(!e||a.scope===e))){c.un(a.ename,a.fn,a.scope);if(!b){Ext.Array.remove(g.managedListeners,a)}}}}else{return g.mixins.observable.removeManagedListenerItem.apply(g,arguments)}},getBubbleTarget:function(){return this.ownerCt},isFloating:function(){return this.floating},isDraggable:function(){return !!this.draggable},isDroppable:function(){return !!this.droppable},onAdded:function(a,b){this.ownerCt=a;this.fireEvent(&quot;added&quot;,this,a,b)},onRemoved:function(){var a=this;a.fireEvent(&quot;removed&quot;,a,a.ownerCt);delete a.ownerCt},beforeDestroy:Ext.emptyFn,onResize:Ext.emptyFn,setSize:function(b,a){var c=this,d;if(Ext.isObject(b)){a=b.height;b=b.width}if(Ext.isNumber(b)){b=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}if(Ext.isNumber(a)){a=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}if(!c.rendered||!c.isVisible()){if(c.hiddenAncestor){d=c.hiddenAncestor.layoutOnShow;d.remove(c);d.add(c)}c.needsLayout={width:b,height:a,isSetSize:true};if(!c.rendered){c.width=(b!==undefined)?b:c.width;c.height=(a!==undefined)?a:c.height}return c}c.doComponentLayout(b,a,true);return c},isFixedWidth:function(){var b=this,a=b.layoutManagedWidth;if(Ext.isDefined(b.width)||a==1){return true}if(a==2){return false}return(b.ownerCt&amp;&amp;b.ownerCt.isFixedWidth())},isFixedHeight:function(){var a=this,b=a.layoutManagedHeight;if(Ext.isDefined(a.height)||b==1){return true}if(b==2){return false}return(a.ownerCt&amp;&amp;a.ownerCt.isFixedHeight())},setCalculatedSize:function(b,a,e){var c=this,d;if(Ext.isObject(b)){e=b.ownerCt;a=b.height;b=b.width}if(Ext.isNumber(b)){b=Ext.Number.constrain(b,c.minWidth,c.maxWidth)}if(Ext.isNumber(a)){a=Ext.Number.constrain(a,c.minHeight,c.maxHeight)}if(!c.rendered||!c.isVisible()){if(c.hiddenAncestor){d=c.hiddenAncestor.layoutOnShow;d.remove(c);d.add(c)}c.needsLayout={width:b,height:a,isSetSize:false,ownerCt:e};return c}c.doComponentLayout(b,a,false,e);return c},doComponentLayout:function(e,b,c,g){var f=this,d=f.getComponentLayout(),a=d.lastComponentSize||{width:undefined,height:undefined};if(f.rendered&amp;&amp;d){if(!Ext.isDefined(e)){if(f.isFixedWidth()){e=Ext.isDefined(f.width)?f.width:a.width}}if(!Ext.isDefined(b)){if(f.isFixedHeight()){b=Ext.isDefined(f.height)?f.height:a.height}}if(c){f.width=e;f.height=b}d.layout(e,b,c,g)}return f},forceComponentLayout:function(){this.doComponentLayout()},setComponentLayout:function(b){var a=this.componentLayout;if(a&amp;&amp;a.isLayout&amp;&amp;a!=b){a.setOwner(null)}this.componentLayout=b;b.setOwner(this)},getComponentLayout:function(){var a=this;if(!a.componentLayout||!a.componentLayout.isLayout){a.setComponentLayout(Ext.layout.Layout.create(a.componentLayout,&quot;autocomponent&quot;))}return a.componentLayout},afterComponentLayout:function(c,a,b,g){var f=this,e=f.componentLayout,d=f.preLayoutSize;++f.componentLayoutCounter;if(!d||((c!==d.width)||(a!==d.height))){f.fireEvent(&quot;resize&quot;,f,c,a)}},beforeComponentLayout:function(c,a,b,d){this.preLayoutSize=this.componentLayout.lastComponentSize;return true},setPosition:function(a,c){var b=this;if(Ext.isObject(a)){c=a.y;a=a.x}if(!b.rendered){return b}if(a!==undefined||c!==undefined){b.el.setBox(a,c);b.onPosition(a,c);b.fireEvent(&quot;move&quot;,b,a,c)}return b},onPosition:Ext.emptyFn,setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.el.getSize()},getWidth:function(){return this.el.getWidth()},getHeight:function(){return this.el.getHeight()},getLoader:function(){var c=this,b=c.autoLoad?(Ext.isObject(c.autoLoad)?c.autoLoad:{url:c.autoLoad}):null,a=c.loader||b;if(a){if(!a.isLoader){c.loader=Ext.create(&quot;Ext.ComponentLoader&quot;,Ext.apply({target:c,autoLoad:b},a))}else{a.setTarget(c)}return c.loader}return null},setLoading:function(c,d){var b=this,a;if(b.rendered){if(c!==false&amp;&amp;!b.collapsed){if(Ext.isObject(c)){a=c}else{if(Ext.isString(c)){a={msg:c}}else{a={}}}b.loadMask=b.loadMask||Ext.create(&quot;Ext.LoadMask&quot;,d?b.getTargetEl():b.el,a);b.loadMask.show()}else{if(b.loadMask){Ext.destroy(b.loadMask);b.loadMask=null}}}return b.loadMask},setDocked:function(b,c){var a=this;a.dock=b;if(c&amp;&amp;a.ownerCt&amp;&amp;a.rendered){a.ownerCt.doComponentLayout()}return a},onDestroy:function(){var a=this;if(a.monitorResize&amp;&amp;Ext.EventManager.resizeEvent){Ext.EventManager.resizeEvent.removeListener(a.setSize,a)}Ext.destroy(a.componentLayout,a.loadMask,a.floatingItems)},cleanElementRefs:function(){var g=this,e=0,f=g.childEls,d=g.renderSelectors,b,c,a;if(g.rendered){if(f){for(a=f.length;e&lt;a;++e){c=f[e];if(typeof(c)!=&quot;string&quot;){c=c.name}delete g[c]}}if(d){for(b in d){if(d.hasOwnProperty(b)){delete g[b]}}}}delete g.rendered;delete g.el;delete g.frameBody},destroy:function(){var a=this;if(!a.isDestroyed){if(a.fireEvent(&quot;beforedestroy&quot;,a)!==false){a.destroying=true;a.beforeDestroy();if(a.floating){delete a.floatParent;if(a.zIndexManager){a.zIndexManager.unregister(a)}}else{if(a.ownerCt&amp;&amp;a.ownerCt.remove){a.ownerCt.remove(a,false)}}a.onDestroy();Ext.destroy(a.plugins);if(a.rendered){a.el.remove()}a.fireEvent(&quot;destroy&quot;,a);Ext.ComponentManager.unregister(a);a.mixins.state.destroy.call(a);a.clearListeners();a.cleanElementRefs();a.destroying=false;a.isDestroyed=true}}},getPlugin:function(b){var c=0,a=this.plugins,d=a.length;for(;c&lt;d;c++){if(a[c].pluginId===b){return a[c]}}},isDescendantOf:function(a){return !!this.findParentBy(function(b){return b===a})}},function(){this.createAlias({on:&quot;addListener&quot;,prev:&quot;previousSibling&quot;,next:&quot;nextSibling&quot;})});Ext.define(&quot;Ext.Component&quot;,{alias:[&quot;widget.component&quot;,&quot;widget.box&quot;],extend:&quot;Ext.AbstractComponent&quot;,requires:[&quot;Ext.util.DelayedTask&quot;],uses:[&quot;Ext.Layer&quot;,&quot;Ext.resizer.Resizer&quot;,&quot;Ext.util.ComponentDragger&quot;],mixins:{floating:&quot;Ext.util.Floating&quot;},statics:{DIRECTION_TOP:&quot;top&quot;,DIRECTION_RIGHT:&quot;right&quot;,DIRECTION_BOTTOM:&quot;bottom&quot;,DIRECTION_LEFT:&quot;left&quot;,VERTICAL_DIRECTION_Re:/^(?:top|bottom)$/,INVALID_ID_CHARS_Re:/[\.,\s]/g},resizeHandles:&quot;all&quot;,floating:false,toFrontOnShow:true,hideMode:&quot;display&quot;,hideParent:false,ariaRole:&quot;presentation&quot;,bubbleEvents:[],actionMode:&quot;el&quot;,monPropRe:/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,constructor:function(a){var b=this;a=a||{};if(a.initialConfig){if(a.isAction){b.baseAction=a}a=a.initialConfig}else{if(a.tagName||a.dom||Ext.isString(a)){a={applyTo:a,id:a.id||a}}}b.callParent([a]);if(b.baseAction){b.baseAction.addComponent(b)}},initComponent:function(){var a=this;a.callParent();if(a.listeners){a.on(a.listeners);delete a.listeners}a.enableBubble(a.bubbleEvents);a.mons=[]},afterRender:function(){var b=this,a=b.resizable;if(b.floating){b.makeFloating(b.floating)}else{b.el.setVisibilityMode(Ext.Element[b.hideMode.toUpperCase()])}if(Ext.isDefined(b.autoScroll)){b.setAutoScroll(b.autoScroll)}b.callParent();if(!(b.x&amp;&amp;b.y)&amp;&amp;(b.pageX||b.pageY)){b.setPagePosition(b.pageX,b.pageY)}if(a){b.initResizable(a)}if(b.draggable){b.initDraggable()}b.initAria()},initAria:function(){var a=this.getActionEl(),b=this.ariaRole;if(b){a.dom.setAttribute(&quot;role&quot;,b)}},setAutoScroll:function(a){var b=this,c;a=!!a;if(b.rendered){c=b.getTargetEl();c.setStyle(&quot;overflow&quot;,a?&quot;auto&quot;:&quot;&quot;);if(a&amp;&amp;(Ext.isIE6||Ext.isIE7)){c.position()}}b.autoScroll=a;return b},makeFloating:function(a){this.mixins.floating.constructor.call(this,a)},initResizable:function(a){var b=this;a=Ext.apply({target:b,dynamic:false,constrainTo:b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():b.el.getScopeParent()),handles:b.resizeHandles},a);a.target=b;b.resizer=Ext.create(&quot;Ext.resizer.Resizer&quot;,a)},getDragEl:function(){return this.el},initDraggable:function(){var b=this,a=Ext.applyIf({el:b.getDragEl(),constrainTo:b.constrain?(b.constrainTo||(b.floatParent?b.floatParent.getTargetEl():b.el.getScopeParent())):undefined},b.draggable);if(b.constrain||b.constrainDelegate){a.constrain=b.constrain;a.constrainDelegate=b.constrainDelegate}b.dd=Ext.create(&quot;Ext.util.ComponentDragger&quot;,b,a)},setPosition:function(j,h,a){var f=this,b=f.el,k={},g,i,e,d,c;if(Ext.isArray(j)){a=h;h=j[1];j=j[0]}f.x=j;f.y=h;if(!f.rendered){return f}g=f.adjustPosition(j,h);i=g.x;e=g.y;d=Ext.isNumber(i);c=Ext.isNumber(e);if(d||c){if(a){if(d){k.left=i}if(c){k.top=e}f.stopAnimation();f.animate(Ext.apply({duration:1000,listeners:{afteranimate:Ext.Function.bind(f.afterSetPosition,f,[i,e])},to:k},a))}else{if(!d){b.setTop(e)}else{if(!c){b.setLeft(i)}else{b.setLeftTop(i,e)}}f.afterSetPosition(i,e)}}return f},afterSetPosition:function(b,a){this.onPosition(b,a);this.fireEvent(&quot;move&quot;,this,b,a)},showAt:function(a,d,b){var c=this;if(c.floating){c.setPosition(a,d,b)}else{c.setPagePosition(a,d,b)}c.show()},setPagePosition:function(a,e,b){var c=this,d;if(Ext.isArray(a)){e=a[1];a=a[0]}c.pageX=a;c.pageY=e;if(c.floating&amp;&amp;c.floatParent){d=c.floatParent.getTargetEl().getViewRegion();if(Ext.isNumber(a)&amp;&amp;Ext.isNumber(d.left)){a-=d.left}if(Ext.isNumber(e)&amp;&amp;Ext.isNumber(d.top)){e-=d.top}c.setPosition(a,e,b)}else{d=c.el.translatePoints(a,e);c.setPosition(d.left,d.top,b)}return c},getBox:function(b){var c=this.getPosition(b),a=this.getSize();a.x=c[0];a.y=c[1];return a},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getOuterSize:function(){var a=this.el;return{width:a.getWidth()+a.getMargin(&quot;lr&quot;),height:a.getHeight()+a.getMargin(&quot;tb&quot;)}},adjustPosition:function(a,c){if(this.floating&amp;&amp;this.floatParent){var b=this.floatParent.getTargetEl().getViewRegion();a+=b.left;c+=b.top}return{x:a,y:c}},getPosition:function(a){var c=this,b=c.el,d,e;if((a===true)||(c.floating&amp;&amp;!c.floatParent)){return[b.getLeft(true),b.getTop(true)]}d=c.xy||b.getXY();if(c.floating){e=c.floatParent.getTargetEl().getViewRegion();d[0]-=e.left;d[1]-=e.top}return d},getId:function(){var a=this,b;if(!a.id){b=a.getXType();b=b?b.replace(Ext.Component.INVALID_ID_CHARS_Re,&quot;-&quot;):&quot;ext-comp&quot;;a.id=b+&quot;-&quot;+a.getAutoId()}return a.id},onEnable:function(){var a=this.getActionEl();a.dom.removeAttribute(&quot;aria-disabled&quot;);a.dom.disabled=false;this.callParent()},onDisable:function(){var a=this.getActionEl();a.dom.setAttribute(&quot;aria-disabled&quot;,true);a.dom.disabled=true;this.callParent()},show:function(d,a,b){var c=this;if(c.rendered&amp;&amp;c.isVisible()){if(c.toFrontOnShow&amp;&amp;c.floating){c.toFront()}}else{if(c.fireEvent(&quot;beforeshow&quot;,c)!==false){c.hidden=false;if(!c.rendered&amp;&amp;(c.autoRender||c.floating)){c.doAutoRender()}if(c.rendered){c.beforeShow();c.onShow.apply(c,arguments);if(c.ownerCt&amp;&amp;!c.floating&amp;&amp;!(c.ownerCt.suspendLayout||c.ownerCt.layout.layoutBusy)){c.ownerCt.doLayout()}c.afterShow.apply(c,arguments)}}}return c},beforeShow:Ext.emptyFn,onShow:function(){var a=this;a.el.show();a.callParent(arguments);if(a.floating&amp;&amp;a.constrain){a.doConstrain()}},afterShow:function(g,b,e){var f=this,a,c,d;g=g||f.animateTarget;if(!f.ghost){g=null}if(g){g=g.el?g.el:Ext.get(g);c=f.el.getBox();a=g.getBox();f.el.addCls(Ext.baseCSSPrefix+&quot;hide-offsets&quot;);d=f.ghost();d.el.stopAnimation();d.el.setX(-10000);d.el.animate({from:a,to:c,listeners:{afteranimate:function(){delete d.componentLayout.lastComponentSize;f.unghost();f.el.removeCls(Ext.baseCSSPrefix+&quot;hide-offsets&quot;);f.onShowComplete(b,e)}}})}else{f.onShowComplete(b,e)}},onShowComplete:function(a,b){var c=this;if(c.floating){c.toFront()}Ext.callback(a,b||c);c.fireEvent(&quot;show&quot;,c)},hide:function(){var a=this;a.showOnParentShow=false;if(!(a.rendered&amp;&amp;!a.isVisible())&amp;&amp;a.fireEvent(&quot;beforehide&quot;,a)!==false){a.hidden=true;if(a.rendered){a.onHide.apply(a,arguments);if(a.ownerCt&amp;&amp;!a.floating&amp;&amp;!(a.ownerCt.suspendLayout||a.ownerCt.layout.layoutBusy)){a.ownerCt.doLayout()}}}return a},onHide:function(f,a,d){var e=this,c,b;f=f||e.animateTarget;if(!e.ghost){f=null}if(f){f=f.el?f.el:Ext.get(f);c=e.ghost();c.el.stopAnimation();b=f.getBox();b.width+=&quot;px&quot;;b.height+=&quot;px&quot;;c.el.animate({to:b,listeners:{afteranimate:function(){delete c.componentLayout.lastComponentSize;c.el.hide();e.afterHide(a,d)}}})}e.el.hide();if(!f){e.afterHide(a,d)}},afterHide:function(a,b){Ext.callback(a,b||this);this.fireEvent(&quot;hide&quot;,this)},onDestroy:function(){var a=this;if(a.rendered){Ext.destroy(a.proxy,a.proxyWrap,a.resizer);if(a.actionMode==&quot;container&quot;||a.removeMode==&quot;container&quot;){a.container.remove()}}delete a.focusTask;a.callParent()},deleteMembers:function(){var b=arguments,a=b.length,c=0;for(;c&lt;a;++c){delete this[b[c]]}},focus:function(d,b){var c=this,a;if(b){if(!c.focusTask){c.focusTask=Ext.create(&quot;Ext.util.DelayedTask&quot;,c.focus)}c.focusTask.delay(Ext.isNumber(b)?b:10,null,c,[d,false]);return c}if(c.rendered&amp;&amp;!c.isDestroyed){a=c.getFocusEl();a.focus();if(a.dom&amp;&amp;d===true){a.dom.select()}if(c.floating){c.toFront(true)}}return c},getFocusEl:function(){return this.el},blur:function(){if(this.rendered){this.getFocusEl().blur()}return this},getEl:function(){return this.el},getResizeEl:function(){return this.el},getPositionEl:function(){return this.el},getActionEl:function(){return this.el},getVisibilityEl:function(){return this.el},onResize:Ext.emptyFn,getBubbleTarget:function(){return this.ownerCt},getContentTarget:function(){return this.el},cloneConfig:function(c){c=c||{};var d=c.id||Ext.id(),a=Ext.applyIf(c,this.initialConfig),b;a.id=d;b=Ext.getClass(this);return new b(a)},getXType:function(){return this.self.xtype},findParentBy:function(a){var b;for(b=this.ownerCt;b&amp;&amp;!a(b,this);b=b.ownerCt){}return b||null},findParentByType:function(a){return Ext.isFunction(a)?this.findParentBy(function(b){return b.constructor===a}):this.up(a)},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.ownerCt}return this},getProxy:function(){var a=this,b;if(!a.proxy){b=Ext.getBody();if(Ext.scopeResetCSS){a.proxyWrap=b=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+&quot;reset&quot;})}a.proxy=a.el.createProxy(Ext.baseCSSPrefix+&quot;proxy-el&quot;,b,true)}return a.proxy}});Ext.define(&quot;Ext.container.AbstractContainer&quot;,{extend:&quot;Ext.Component&quot;,requires:[&quot;Ext.util.MixedCollection&quot;,&quot;Ext.layout.container.Auto&quot;,&quot;Ext.ZIndexManager&quot;],suspendLayout:false,autoDestroy:true,defaultType:&quot;panel&quot;,isContainer:true,layoutCounter:0,baseCls:Ext.baseCSSPrefix+&quot;container&quot;,bubbleEvents:[&quot;add&quot;,&quot;remove&quot;],initComponent:function(){var a=this;a.addEvents(&quot;afterlayout&quot;,&quot;beforeadd&quot;,&quot;beforeremove&quot;,&quot;add&quot;,&quot;remove&quot;);a.layoutOnShow=Ext.create(&quot;Ext.util.MixedCollection&quot;);a.callParent();a.initItems()},initItems:function(){var b=this,a=b.items;b.items=Ext.create(&quot;Ext.util.MixedCollection&quot;,false,b.getComponentId);if(a){if(!Ext.isArray(a)){a=[a]}b.add(a)}},afterRender:function(){this.getLayout();this.callParent()},renderChildren:function(){var b=this,a=b.getLayout();b.callParent();if(a){b.suspendLayout=true;a.renderChildren();delete b.suspendLayout}},setLayout:function(b){var a=this.layout;if(a&amp;&amp;a.isLayout&amp;&amp;a!=b){a.setOwner(null)}this.layout=b;b.setOwner(this)},getLayout:function(){var a=this;if(!a.layout||!a.layout.isLayout){a.setLayout(Ext.layout.Layout.create(a.layout,&quot;autocontainer&quot;))}return a.layout},doLayout:function(){var b=this,a=b.getLayout();if(b.rendered&amp;&amp;a&amp;&amp;!b.suspendLayout){if(!b.isFixedWidth()||!b.isFixedHeight()){if(b.componentLayout.layoutBusy!==true){b.doComponentLayout();if(b.componentLayout.layoutCancelled===true){a.layout()}}}else{if(a.layoutBusy!==true){a.layout()}}}return b},afterLayout:function(a){++this.layoutCounter;this.fireEvent(&quot;afterlayout&quot;,this,a)},prepareItems:function(b,d){if(!Ext.isArray(b)){b=[b]}var c=0,a=b.length,e;for(;c&lt;a;c++){e=b[c];if(d){e=this.applyDefaults(e)}b[c]=this.lookupComponent(e)}return b},applyDefaults:function(a){var b=this.defaults;if(b){if(Ext.isFunction(b)){b=b.call(this,a)}if(Ext.isString(a)){a=Ext.ComponentManager.get(a)}Ext.applyIf(a,b)}return a},lookupComponent:function(a){return Ext.isString(a)?Ext.ComponentManager.get(a):this.createComponent(a)},createComponent:function(a,b){return Ext.ComponentManager.create(a,b||this.defaultType)},getComponentId:function(a){return a.getItemId()},add:function(){var h=this,f=Array.prototype.slice.call(arguments),a,g,b=[],c,e,k,d=-1,j;if(typeof f[0]==&quot;number&quot;){d=f.shift()}a=f.length&gt;1;if(a||Ext.isArray(f[0])){g=a?f:f[0];h.suspendLayout=true;for(c=0,e=g.length;c&lt;e;c++){k=g[c];if(d!=-1){k=h.add(d+c,k)}else{k=h.add(k)}b.push(k)}h.suspendLayout=false;h.doLayout();return b}j=h.prepareItems(f[0],true)[0];if(j.floating){j.onAdded(h,d)}else{d=(d!==-1)?d:h.items.length;if(h.fireEvent(&quot;beforeadd&quot;,h,j,d)!==false&amp;&amp;h.onBeforeAdd(j)!==false){h.items.insert(d,j);j.onAdded(h,d);h.onAdd(j,d);h.fireEvent(&quot;add&quot;,h,j,d)}h.doLayout()}return j},onAdd:Ext.emptyFn,onRemove:Ext.emptyFn,insert:function(b,a){return this.add(b,a)},move:function(b,d){var a=this.items,c;c=a.removeAt(b);if(c===false){return false}a.insert(d,c);this.doLayout();return c},onBeforeAdd:function(b){var a=this;if(b.ownerCt){b.ownerCt.remove(b,false)}if(a.border===false||a.border===0){b.border=(b.border===true)}},remove:function(a,b){var d=this,e=d.getComponent(a);if(e&amp;&amp;d.fireEvent(&quot;beforeremove&quot;,d,e)!==false){d.doRemove(e,b);d.fireEvent(&quot;remove&quot;,d,e)}return e},doRemove:function(c,b){var e=this,d=e.layout,a=d&amp;&amp;e.rendered;e.items.remove(c);c.onRemoved();if(a){d.onRemove(c)}e.onRemove(c,b);if(b===true||(b!==false&amp;&amp;e.autoDestroy)){c.destroy()}if(a&amp;&amp;!b){d.afterRemove(c)}if(!e.destroying){e.doLayout()}},removeAll:function(c){var g=this,e=g.items.items.slice(),b=[],d=0,a=e.length,f;g.suspendLayout=true;for(;d&lt;a;d++){f=e[d];g.remove(f,c);if(f.ownerCt!==g){b.push(f)}}g.suspendLayout=false;if(a){g.doLayout()}return b},getRefItems:function(c){var g=this,d=g.items.items,b=d.length,e=0,f,a=[];for(;e&lt;b;e++){f=d[e];a.push(f);if(c&amp;&amp;f.getRefItems){a.push.apply(a,f.getRefItems(true))}}if(g.floatingItems&amp;&amp;g.floatingItems.accessList){a.push.apply(a,g.floatingItems.accessList)}return a},cascade:function(k,l,a){var j=this,e=j.items?j.items.items:[],f=e.length,d=0,h,g=a?a.concat(j):[j],b=g.length-1;if(k.apply(l||j,g)!==false){for(;d&lt;f;d++){h=e[d];if(h.cascade){h.cascade(k,l,a)}else{g[b]=h;k.apply(l||e,g)}}}return this},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.items.get(a)},query:function(a){a=a||&quot;*&quot;;return Ext.ComponentQuery.query(a,this)},child:function(a){a=a||&quot;&quot;;return this.query(&quot;&gt; &quot;+a)[0]||null},down:function(a){return this.query(a)[0]||null},show:function(){this.callParent(arguments);this.performDeferredLayouts();return this},performDeferredLayouts:function(){var e=this.layoutOnShow,d=e.getCount(),b=0,a,c;for(;b&lt;d;b++){c=e.get(b);a=c.needsLayout;if(Ext.isObject(a)){c.doComponentLayout(a.width,a.height,a.isSetSize,a.ownerCt)}}e.clear()},onEnable:function(){Ext.Array.each(this.query(&quot;[isFormField]&quot;),function(a){if(a.resetDisable){a.enable();delete a.resetDisable}});this.callParent()},onDisable:function(){Ext.Array.each(this.query(&quot;[isFormField]&quot;),function(a){if(a.resetDisable!==false&amp;&amp;!a.disabled){a.disable();a.resetDisable=true}});this.callParent()},beforeLayout:function(){return true},beforeDestroy:function(){var b=this,a=b.items,d;if(a){while((d=a.first())){b.doRemove(d,true)}}Ext.destroy(b.layout);b.callParent()}});Ext.define(&quot;Ext.container.Container&quot;,{extend:&quot;Ext.container.AbstractContainer&quot;,alias:&quot;widget.container&quot;,alternateClassName:&quot;Ext.Container&quot;,getChildByElement:function(d){var f,b,a=0,c=this.items.items,e=c.length;d=Ext.getDom(d);for(;a&lt;e;a++){f=c[a];b=f.getEl();if((b.dom===d)||b.contains(d)){return f}}return null}});Ext.define(&quot;Ext.panel.Header&quot;,{extend:&quot;Ext.container.Container&quot;,uses:[&quot;Ext.panel.Tool&quot;,&quot;Ext.draw.Component&quot;,&quot;Ext.util.CSS&quot;],alias:&quot;widget.header&quot;,isHeader:true,defaultType:&quot;tool&quot;,indicateDrag:false,weight:-1,renderTpl:['&lt;div id=&quot;{id}-body&quot; class=&quot;{baseCls}-body&lt;tpl if=&quot;bodyCls&quot;&gt; {bodyCls}&lt;/tpl&gt;','&lt;tpl if=&quot;uiCls&quot;&gt;','&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-body-{parent.ui}-{.}&lt;/tpl&gt;','&lt;/tpl&gt;&quot;','&lt;tpl if=&quot;bodyStyle&quot;&gt; style=&quot;{bodyStyle}&quot;&lt;/tpl&gt;&gt;&lt;/div&gt;'],initComponent:function(){var c=this,f,e,b,a,d;c.indicateDragCls=c.baseCls+&quot;-draggable&quot;;c.title=c.title||&quot;&amp;#160;&quot;;c.tools=c.tools||[];c.items=c.items||[];c.orientation=c.orientation||&quot;horizontal&quot;;c.dock=(c.dock)?c.dock:(c.orientation==&quot;horizontal&quot;)?&quot;top&quot;:&quot;left&quot;;c.addClsWithUI(c.orientation);c.addClsWithUI(c.dock);c.addChildEls(&quot;body&quot;);if(!Ext.isEmpty(c.iconCls)){c.initIconCmp();c.items.push(c.iconCmp)}if(c.orientation==&quot;vertical&quot;){if(Ext.isIE6||Ext.isIE7){c.width=this.width||24}else{if(Ext.isIEQuirks){c.width=this.width||25}}c.layout={type:&quot;vbox&quot;,align:&quot;center&quot;,clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.textConfig={cls:c.baseCls+&quot;-text&quot;,type:&quot;text&quot;,text:c.title,rotate:{degrees:90}};d=c.ui;if(Ext.isArray(d)){d=d[0]}f=&quot;.&quot;+c.baseCls+&quot;-text-&quot;+d;if(Ext.scopeResetCSS){f=&quot;.&quot;+Ext.baseCSSPrefix+&quot;reset &quot;+f}e=Ext.util.CSS.getRule(f);if(e){b=e.style}if(b){Ext.apply(c.textConfig,{&quot;font-family&quot;:b.fontFamily,&quot;font-weight&quot;:b.fontWeight,&quot;font-size&quot;:b.fontSize,fill:b.color})}c.titleCmp=Ext.create(&quot;Ext.draw.Component&quot;,{ariaRole:&quot;heading&quot;,focusable:false,viewBox:false,flex:1,autoSize:true,margins:&quot;5 0 0 0&quot;,items:[c.textConfig],renderSelectors:{textEl:&quot;.&quot;+c.baseCls+&quot;-text&quot;}})}else{c.layout={type:&quot;hbox&quot;,align:&quot;middle&quot;,clearInnerCtOnLayout:true,bindToOwnerCtContainer:false};c.titleCmp=Ext.create(&quot;Ext.Component&quot;,{xtype:&quot;component&quot;,ariaRole:&quot;heading&quot;,focusable:false,flex:1,cls:c.baseCls+&quot;-text-container&quot;,renderTpl:['&lt;span id=&quot;{id}-textEl&quot; class=&quot;{cls}-text {cls}-text-{ui}&quot;&gt;{title}&lt;/span&gt;'],renderData:{title:c.title,cls:c.baseCls,ui:c.ui},childEls:[&quot;textEl&quot;]})}c.items.push(c.titleCmp);c.items=c.items.concat(c.tools);this.callParent()},initIconCmp:function(){this.iconCmp=Ext.create(&quot;Ext.Component&quot;,{focusable:false,renderTpl:['&lt;img id=&quot;{id}-iconEl&quot; alt=&quot;&quot; src=&quot;{blank}&quot; class=&quot;{cls}-icon {iconCls}&quot;/&gt;'],renderData:{blank:Ext.BLANK_IMAGE_URL,cls:this.baseCls,iconCls:this.iconCls,orientation:this.orientation},childEls:[&quot;iconEl&quot;],iconCls:this.iconCls})},afterRender:function(){var a=this;a.el.unselectable();if(a.indicateDrag){a.el.addCls(a.indicateDragCls)}a.mon(a.el,{click:a.onClick,scope:a});a.callParent()},afterLayout:function(){var a=this;a.callParent(arguments);if(Ext.isIE7){a.el.repaint()}},addUIClsToElement:function(b,f){var e=this,a=e.callParent(arguments),d=[e.baseCls+&quot;-body-&quot;+b,e.baseCls+&quot;-body-&quot;+e.ui+&quot;-&quot;+b],g,c;if(!f&amp;&amp;e.rendered){if(e.bodyCls){e.body.addCls(e.bodyCls)}else{e.body.addCls(d)}}else{if(e.bodyCls){g=e.bodyCls.split(&quot; &quot;);for(c=0;c&lt;d.length;c++){if(!Ext.Array.contains(g,d[c])){g.push(d[c])}}e.bodyCls=g.join(&quot; &quot;)}else{e.bodyCls=d.join(&quot; &quot;)}}return a},removeUIClsFromElement:function(b,f){var e=this,a=e.callParent(arguments),d=[e.baseCls+&quot;-body-&quot;+b,e.baseCls+&quot;-body-&quot;+e.ui+&quot;-&quot;+b],g,c;if(!f&amp;&amp;e.rendered){if(e.bodyCls){e.body.removeCls(e.bodyCls)}else{e.body.removeCls(d)}}else{if(e.bodyCls){g=e.bodyCls.split(&quot; &quot;);for(c=0;c&lt;d.length;c++){Ext.Array.remove(g,d[c])}e.bodyCls=g.join(&quot; &quot;)}}return a},addUIToElement:function(c){var b=this,d,a;b.callParent(arguments);a=b.baseCls+&quot;-body-&quot;+b.ui;if(!c&amp;&amp;b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){d=b.bodyCls.split(&quot; &quot;);if(!Ext.Array.contains(d,a)){d.push(a)}b.bodyCls=d.join(&quot; &quot;)}else{b.bodyCls=a}}if(!c&amp;&amp;b.titleCmp&amp;&amp;b.titleCmp.rendered&amp;&amp;b.titleCmp.textEl){b.titleCmp.textEl.addCls(b.baseCls+&quot;-text-&quot;+b.ui)}},removeUIFromElement:function(){var b=this,c,a;b.callParent(arguments);a=b.baseCls+&quot;-body-&quot;+b.ui;if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(&quot; &quot;);Ext.Array.remove(c,a);b.bodyCls=c.join(&quot; &quot;)}else{b.bodyCls=a}}if(b.titleCmp&amp;&amp;b.titleCmp.rendered&amp;&amp;b.titleCmp.textEl){b.titleCmp.textEl.removeCls(b.baseCls+&quot;-text-&quot;+b.ui)}},onClick:function(a){if(!a.getTarget(Ext.baseCSSPrefix+&quot;tool&quot;)){this.fireEvent(&quot;click&quot;,a)}},getTargetEl:function(){return this.body||this.frameBody||this.el},setTitle:function(d){var c=this;if(c.rendered){if(c.titleCmp.rendered){if(c.titleCmp.surface){c.title=d||&quot;&quot;;var b=c.titleCmp.surface.items.items[0],a=c.titleCmp.surface;a.remove(b);c.textConfig.type=&quot;text&quot;;c.textConfig.text=d;b=a.add(c.textConfig);b.setAttributes({rotate:{degrees:90}},true);c.titleCmp.autoSizeSurface()}else{c.title=d||&quot;&amp;#160;&quot;;c.titleCmp.textEl.update(c.title)}}else{c.titleCmp.on({render:function(){c.setTitle(d)},single:true})}}else{c.on({render:function(){c.layout.layout();c.setTitle(d)},single:true})}},setIconCls:function(a){var c=this,e=!a||!a.length,d=c.iconCmp,b;c.iconCls=a;if(!c.iconCmp&amp;&amp;!e){c.initIconCmp();c.insert(0,c.iconCmp)}else{if(d){if(e){c.iconCmp.destroy()}else{b=d.iconEl;b.removeCls(d.iconCls);b.addCls(a);d.iconCls=a}}}},addTool:function(a){this.tools.push(this.add(a))},onAdd:function(b,a){this.callParent([arguments]);if(b instanceof Ext.panel.Tool){b.bindTo(this.ownerCt);this.tools[b.type]=b}}});Ext.define(&quot;Ext.toolbar.Fill&quot;,{extend:&quot;Ext.Component&quot;,alias:&quot;widget.tbfill&quot;,alternateClassName:&quot;Ext.Toolbar.Fill&quot;,isFill:true,flex:1});Ext.define(&quot;Ext.toolbar.Item&quot;,{extend:&quot;Ext.Component&quot;,alias:&quot;widget.tbitem&quot;,alternateClassName:&quot;Ext.Toolbar.Item&quot;,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.define(&quot;Ext.toolbar.Separator&quot;,{extend:&quot;Ext.toolbar.Item&quot;,alias:&quot;widget.tbseparator&quot;,alternateClassName:&quot;Ext.Toolbar.Separator&quot;,baseCls:Ext.baseCSSPrefix+&quot;toolbar-separator&quot;,focusable:false});Ext.define(&quot;Ext.menu.Manager&quot;,{singleton:true,requires:[&quot;Ext.util.MixedCollection&quot;,&quot;Ext.util.KeyMap&quot;],alternateClassName:&quot;Ext.menu.MenuMgr&quot;,uses:[&quot;Ext.menu.Menu&quot;],menus:{},groups:{},attached:false,lastShow:new Date(),init:function(){var a=this;a.active=Ext.create(&quot;Ext.util.MixedCollection&quot;);Ext.getDoc().addKeyListener(27,function(){if(a.active.length&gt;0){a.hideAll()}},a)},hideAll:function(){var a=this.active,b;if(a&amp;&amp;a.length&gt;0){b=a.clone();b.each(function(c){c.hide()});return true}return false},onHide:function(a){var b=this,c=b.active;c.remove(a);if(c.length&lt;1){Ext.getDoc().un(&quot;mousedown&quot;,b.onMouseDown,b);b.attached=false}},onShow:function(a){var e=this,f=e.active,d=f.last(),c=e.attached,b=a.getEl(),g;e.lastShow=new Date();f.add(a);if(!c){Ext.getDoc().on(&quot;mousedown&quot;,e.onMouseDown,e);e.attached=true}a.toFront()},onBeforeHide:function(a){if(a.activeChild){a.activeChild.hide()}if(a.autoHideTimer){clearTimeout(a.autoHideTimer);delete a.autoHideTimer}},onBeforeShow:function(a){var c=this.active,b=a.parentMenu;c.remove(a);if(!b&amp;&amp;!a.allowOtherMenus){this.hideAll()}else{if(b&amp;&amp;b.activeChild&amp;&amp;a!=b.activeChild){b.activeChild.hide()}}},onMouseDown:function(f){var b=this,d=b.active,a=b.lastShow,c=f.target;if(Ext.Date.getElapsed(a)&gt;50&amp;&amp;d.length&gt;0&amp;&amp;!f.getTarget(&quot;.&quot;+Ext.baseCSSPrefix+&quot;menu&quot;)){b.hideAll();if(Ext.isIE&amp;&amp;Ext.fly(c).focusable()){c.focus()}}},register:function(b){var a=this;if(!a.active){a.init()}if(b.floating){a.menus[b.id]=b;b.on({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})}},get:function(b){var a=this.menus;if(typeof b==&quot;string&quot;){if(!a){return null}return a[b]}else{if(b.isMenu){return b}else{if(Ext.isArray(b)){return Ext.create(&quot;Ext.menu.Menu&quot;,{items:b})}else{return Ext.ComponentManager.create(b,&quot;menu&quot;)}}}},unregister:function(d){var a=this,b=a.menus,c=a.active;delete b[d.id];c.remove(d);d.un({beforehide:a.onBeforeHide,hide:a.onHide,beforeshow:a.onBeforeShow,show:a.onShow,scope:a})},registerCheckable:function(c){var a=this.groups,b=c.group;if(b){if(!a[b]){a[b]=[]}a[b].push(c)}},unregisterCheckable:function(c){var a=this.groups,b=c.group;if(b){Ext.Array.remove(a[b],c)}},onCheckChange:function(d,f){var a=this.groups,c=d.group,b=0,h,e,g;if(c&amp;&amp;f){h=a[c];e=h.length;for(;b&lt;e;b++){g=h[b];if(g!=d){g.setChecked(false)}}}}});Ext.define(&quot;Ext.layout.component.Button&quot;,{alias:[&quot;layout.button&quot;],extend:&quot;Ext.layout.component.Component&quot;,type:&quot;button&quot;,cellClsRE:/-btn-(tl|br)\b/,htmlRE:/&lt;.*&gt;/,beforeLayout:function(){return this.callParent(arguments)||this.lastText!==this.owner.text},onLayout:function(c,n){var k=this,g=Ext.isNumber,d=k.owner,m=d.el,h=d.btnEl,e=d.btnInnerEl,f=d.btnIconEl,i=(d.icon||d.iconCls)&amp;&amp;(d.iconAlign==&quot;top&quot;||d.iconAlign==&quot;bottom&quot;),b=d.minWidth,l=d.maxWidth,a,o,j;k.getTargetInfo();k.callParent(arguments);e.unclip();k.setTargetSize(c,n);if(!g(c)){if(d.text&amp;&amp;(Ext.isIE6||Ext.isIE7)&amp;&amp;Ext.isStrict&amp;&amp;h&amp;&amp;h.getWidth()&gt;20){o=k.btnFrameWidth;j=Ext.util.TextMetrics.measure(e,d.text);m.setWidth(j.width+o+k.adjWidth);h.setWidth(j.width+o);e.setWidth(j.width+o);if(i){f.setWidth(j.width+o)}}else{m.setWidth(null);h.setWidth(null);e.setWidth(null);f.setWidth(null)}if(b||l){a=m.getWidth();if(b&amp;&amp;(a&lt;b)){k.setTargetSize(b,n)}else{if(l&amp;&amp;(a&gt;l)){e.clip();k.setTargetSize(l,n)}}}}this.lastText=d.text},setTargetSize:function(a,k){var g=this,b=g.owner,e=Ext.isNumber,d=b.btnInnerEl,i=(e(a)?a-g.adjWidth:a),f=(e(k)?k-g.adjHeight:k),c=g.btnFrameHeight,j=b.getText(),h;g.callParent(arguments);g.setElementSize(b.btnEl,i,f);g.setElementSize(d,i,f);if(f&gt;=0){d.setStyle(&quot;line-height&quot;,f-c+&quot;px&quot;)}if(j&amp;&amp;this.htmlRE.test(j)){d.setStyle(&quot;line-height&quot;,&quot;normal&quot;);h=Ext.util.TextMetrics.measure(d,j).height;d.setStyle(&quot;padding-top&quot;,g.btnFrameTop+Math.max(d.getHeight()-c-h,0)/2+&quot;px&quot;);g.setElementSize(d,i,f)}},getTargetInfo:function(){var e=this,a=e.owner,d=a.el,c=e.frameSize,g=a.frameBody,b=a.btnWrap,f=a.btnInnerEl;if(!(&quot;adjWidth&quot; in e)){Ext.apply(e,{adjWidth:c.left+c.right+d.getBorderWidth(&quot;lr&quot;)+d.getPadding(&quot;lr&quot;)+b.getPadding(&quot;lr&quot;)+(g?g.getFrameWidth(&quot;lr&quot;):0),adjHeight:c.top+c.bottom+d.getBorderWidth(&quot;tb&quot;)+d.getPadding(&quot;tb&quot;)+b.getPadding(&quot;tb&quot;)+(g?g.getFrameWidth(&quot;tb&quot;):0),btnFrameWidth:f.getFrameWidth(&quot;lr&quot;),btnFrameHeight:f.getFrameWidth(&quot;tb&quot;),btnFrameTop:f.getFrameWidth(&quot;t&quot;)})}return e.callParent()}});Ext.define(&quot;Ext.button.Button&quot;,{alias:&quot;widget.button&quot;,extend:&quot;Ext.Component&quot;,requires:[&quot;Ext.menu.Manager&quot;,&quot;Ext.util.ClickRepeater&quot;,&quot;Ext.layout.component.Button&quot;,&quot;Ext.util.TextMetrics&quot;,&quot;Ext.util.KeyMap&quot;],alternateClassName:&quot;Ext.Button&quot;,isButton:true,componentLayout:&quot;button&quot;,hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:&quot;tl-bl?&quot;,textAlign:&quot;center&quot;,type:&quot;button&quot;,clickEvent:&quot;click&quot;,preventDefault:true,handleMouseEvents:true,tooltipType:&quot;qtip&quot;,baseCls:Ext.baseCSSPrefix+&quot;btn&quot;,pressedCls:&quot;pressed&quot;,overCls:&quot;over&quot;,focusCls:&quot;focus&quot;,menuActiveCls:&quot;menu-active&quot;,ariaRole:&quot;button&quot;,renderTpl:'&lt;em id=&quot;{id}-btnWrap&quot; class=&quot;{splitCls}&quot;&gt;&lt;tpl if=&quot;href&quot;&gt;&lt;a id=&quot;{id}-btnEl&quot; href=&quot;{href}&quot; target=&quot;{target}&quot;&lt;tpl if=&quot;tabIndex&quot;&gt; tabIndex=&quot;{tabIndex}&quot;&lt;/tpl&gt; role=&quot;link&quot;&gt;&lt;span id=&quot;{id}-btnInnerEl&quot; class=&quot;{baseCls}-inner&quot;&gt;{text}&lt;/span&gt;&lt;span id=&quot;{id}-btnIconEl&quot; class=&quot;{baseCls}-icon&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;/tpl&gt;&lt;tpl if=&quot;!href&quot;&gt;&lt;button id=&quot;{id}-btnEl&quot; type=&quot;{type}&quot; hidefocus=&quot;true&quot;&lt;tpl if=&quot;tabIndex&quot;&gt; tabIndex=&quot;{tabIndex}&quot;&lt;/tpl&gt; role=&quot;button&quot; autocomplete=&quot;off&quot;&gt;&lt;span id=&quot;{id}-btnInnerEl&quot; class=&quot;{baseCls}-inner&quot; style=&quot;{innerSpanStyle}&quot;&gt;{text}&lt;/span&gt;&lt;span id=&quot;{id}-btnIconEl&quot; class=&quot;{baseCls}-icon {iconCls}&quot;&gt;&amp;#160;&lt;/span&gt;&lt;/button&gt;&lt;/tpl&gt;&lt;/em&gt;',scale:&quot;small&quot;,allowedScales:[&quot;small&quot;,&quot;medium&quot;,&quot;large&quot;],iconAlign:&quot;left&quot;,arrowAlign:&quot;right&quot;,arrowCls:&quot;arrow&quot;,maskOnDisable:false,initComponent:function(){var a=this;a.callParent(arguments);a.addEvents(&quot;click&quot;,&quot;toggle&quot;,&quot;mouseover&quot;,&quot;mouseout&quot;,&quot;menushow&quot;,&quot;menuhide&quot;,&quot;menutriggerover&quot;,&quot;menutriggerout&quot;);if(a.menu){a.split=true;a.menu=Ext.menu.Manager.get(a.menu);a.menu.ownerCt=a}if(a.url){a.href=a.url}if(a.href&amp;&amp;!a.hasOwnProperty(&quot;preventDefault&quot;)){a.preventDefault=false}if(Ext.isString(a.toggleGroup)){a.enableToggle=true}},initAria:function(){this.callParent();var a=this.getActionEl();if(this.menu){a.dom.setAttribute(&quot;aria-haspopup&quot;,true)}},getActionEl:function(){return this.btnEl},getFocusEl:function(){return this.btnEl},setButtonCls:function(){var d=this,b=[],a=d.btnIconEl,c=&quot;x-hide-display&quot;;if(d.useSetClass){if(!Ext.isEmpty(d.oldCls)){d.removeClsWithUI(d.oldCls);d.removeClsWithUI(d.pressedCls)}if(d.iconCls||d.icon){if(d.text){b.push(&quot;icon-text-&quot;+d.iconAlign)}else{b.push(&quot;icon&quot;)}if(a){a.removeCls(c)}}else{if(d.text){b.push(&quot;noicon&quot;)}if(a){a.addCls(c)}}d.oldCls=b;d.addClsWithUI(b);d.addClsWithUI(d.pressed?d.pressedCls:null)}},onRender:function(d,a){var e=this,c,b;Ext.applyIf(e.renderData,e.getTemplateArgs());e.addChildEls(&quot;btnEl&quot;,&quot;btnWrap&quot;,&quot;btnInnerEl&quot;,&quot;btnIconEl&quot;);if(e.scale){e.ui=e.ui+&quot;-&quot;+e.scale}e.callParent(arguments);if(e.split&amp;&amp;e.arrowTooltip){e.arrowEl.dom.setAttribute(e.getTipAttr(),e.arrowTooltip)}e.mon(e.btnEl,{scope:e,focus:e.onFocus,blur:e.onBlur});b=e.el;if(e.icon){e.setIcon(e.icon)}if(e.iconCls){e.setIconCls(e.iconCls)}if(e.tooltip){e.setTooltip(e.tooltip,true)}if(e.textAlign){e.setTextAlign(e.textAlign)}if(e.handleMouseEvents){e.mon(b,{scope:e,mouseover:e.onMouseOver,mouseout:e.onMouseOut,mousedown:e.onMouseDown});if(e.split){e.mon(b,{mousemove:e.onMouseMove,scope:e})}}if(e.menu){e.mon(e.menu,{scope:e,show:e.onMenuShow,hide:e.onMenuHide});e.keyMap=Ext.create(&quot;Ext.util.KeyMap&quot;,e.el,{key:Ext.EventObject.DOWN,handler:e.onDownKey,scope:e})}if(e.repeat){c=Ext.create(&quot;Ext.util.ClickRepeater&quot;,b,Ext.isObject(e.repeat)?e.repeat:{});e.mon(c,&quot;click&quot;,e.onRepeatClick,e)}else{e.mon(b,e.clickEvent,e.onClick,e)}Ext.ButtonToggleManager.register(e)},getTemplateArgs:function(){var c=this,b=c.getPersistentBtnPadding(),a=&quot;&quot;;if(Math.max.apply(Math,b)&gt;0){a=&quot;margin:&quot;+Ext.Array.map(b,function(d){return -d+&quot;px&quot;}).join(&quot; &quot;)}return{href:c.getHref(),target:c.target||&quot;_blank&quot;,type:c.type,splitCls:c.getSplitCls(),cls:c.cls,iconCls:c.iconCls||&quot;&quot;,text:c.text||&quot;&amp;#160;&quot;,tabIndex:c.tabIndex,innerSpanStyle:a}},getHref:function(){var a=this,b=Ext.apply({},a.baseParams);b=Ext.apply(b,a.params);return a.href?Ext.urlAppend(a.href,Ext.Object.toQueryString(b)):false},setParams:function(a){this.params=a;this.btnEl.dom.href=this.getHref()},getSplitCls:function(){var a=this;return a.split?(a.baseCls+&quot;-&quot;+a.arrowCls)+&quot; &quot;+(a.baseCls+&quot;-&quot;+a.arrowCls+&quot;-&quot;+a.arrowAlign):&quot;&quot;},afterRender:function(){var a=this;a.useSetClass=true;a.setButtonCls();a.doc=Ext.getDoc();this.callParent(arguments)},setIconCls:function(b){var d=this,a=d.btnIconEl,c=d.iconCls;d.iconCls=b;if(a){a.removeCls(c);a.addCls(b||&quot;&quot;);d.setButtonCls()}return d},setTooltip:function(c,a){var b=this;if(b.rendered){if(!a){b.clearTip()}if(Ext.isObject(c)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.btnEl.id},c));b.tooltip=c}else{b.btnEl.dom.setAttribute(b.getTipAttr(),c)}}else{b.tooltip=c}return b},setTextAlign:function(c){var b=this,a=b.btnEl;if(a){a.removeCls(b.baseCls+&quot;-&quot;+b.textAlign);a.addCls(b.baseCls+&quot;-&quot;+c)}b.textAlign=c;return b},getTipAttr:function(){return this.tooltipType==&quot;qtip&quot;?&quot;data-qtip&quot;:&quot;title&quot;},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.btnEl)}},beforeDestroy:function(){var a=this;if(a.rendered){a.clearTip()}if(a.menu&amp;&amp;a.destroyMenu!==false){Ext.destroy(a.menu)}Ext.destroy(a.btnInnerEl,a.repeater);a.callParent()},onDestroy:function(){var a=this;if(a.rendered){a.doc.un(&quot;mouseover&quot;,a.monitorMouseOver,a);a.doc.un(&quot;mouseup&quot;,a.onMouseUp,a);delete a.doc;Ext.ButtonToggleManager.unregister(a);Ext.destroy(a.keyMap);delete a.keyMap}a.callParent()},setHandler:function(b,a){this.handler=b;this.scope=a;return this},setText:function(b){var a=this;a.text=b;if(a.el){a.btnInnerEl.update(b||&quot;&amp;#160;&quot;);a.setButtonCls()}a.doComponentLayout();return a},setIcon:function(b){var c=this,a=c.btnIconEl;c.icon=b;if(a){a.setStyle(&quot;background-image&quot;,b?&quot;url(&quot;+b+&quot;)&quot;:&quot;&quot;);c.setButtonCls()}return c},getText:function(){return this.text},toggle:function(c,a){var b=this;c=c===undefined?!b.pressed:!!c;if(c!==b.pressed){if(b.rendered){b[c?&quot;addClsWithUI&quot;:&quot;removeClsWithUI&quot;](b.pressedCls)}b.btnEl.dom.setAttribute(&quot;aria-pressed&quot;,c);b.pressed=c;if(!a){b.fireEvent(&quot;toggle&quot;,b,c);Ext.callback(b.toggleHandler,b.scope||b,[b,c])}}return b},maybeShowMenu:function(){var a=this;if(a.menu&amp;&amp;!a.hasVisibleMenu()&amp;&amp;!a.ignoreNextClick){a.showMenu()}},showMenu:function(){var a=this;if(a.rendered&amp;&amp;a.menu){if(a.tooltip&amp;&amp;a.getTipAttr()!=&quot;title&quot;){Ext.tip.QuickTipManager.getQuickTip().cancelShow(a.btnEl)}if(a.menu.isVisible()){a.menu.hide()}a.menu.showBy(a.el,a.menuAlign)}return a},hideMenu:function(){if(this.hasVisibleMenu()){this.menu.hide()}return this},hasVisibleMenu:function(){var a=this.menu;return a&amp;&amp;a.rendered&amp;&amp;a.isVisible()},onRepeatClick:function(a,b){this.onClick(b)},onClick:function(b){var a=this;if(a.preventDefault||(a.disabled&amp;&amp;a.getHref())&amp;&amp;b){b.preventDefault()}if(b.button!==0){return}if(!a.disabled){a.doToggle();a.maybeShowMenu();a.fireHandler(b)}},fireHandler:function(c){var b=this,a=b.handler;b.fireEvent(&quot;click&quot;,b,c);if(a){a.call(b.scope||b,b,c)}b.onBlur()},doToggle:function(){var a=this;if(a.enableToggle&amp;&amp;(a.allowDepress!==false||!a.pressed)){a.toggle()}},onMouseOver:function(b){var a=this;if(!a.disabled&amp;&amp;!b.within(a.el,true,true)){a.onMouseEnter(b)}},onMouseOut:function(b){var a=this;if(!b.within(a.el,true,true)){if(a.overMenuTrigger){a.onMenuTriggerOut(b)}a.onMouseLeave(b)}},onMouseMove:function(g){var d=this,c=d.el,f=d.overMenuTrigger,b,a;if(d.split){if(d.arrowAlign===&quot;right&quot;){b=g.getX()-c.getX();a=c.getWidth()}else{b=g.getY()-c.getY();a=c.getHeight()}if(b&gt;(a-d.getTriggerSize())){if(!f){d.onMenuTriggerOver(g)}}else{if(f){d.onMenuTriggerOut(g)}}}},getTriggerSize:function(){var e=this,c=e.triggerSize,b,a,d;if(c===d){b=e.arrowAlign;a=b.charAt(0);c=e.triggerSize=e.el.getFrameWidth(a)+e.btnWrap.getFrameWidth(a)+(e.frameSize&amp;&amp;e.frameSize[b]||0)}return c},onMouseEnter:function(b){var a=this;a.addClsWithUI(a.overCls);a.fireEvent(&quot;mouseover&quot;,a,b)},onMouseLeave:function(b){var a=this;a.removeClsWithUI(a.overCls);a.fireEvent(&quot;mouseout&quot;,a,b)},onMenuTriggerOver:function(b){var a=this;a.overMenuTrigger=true;a.fireEvent(&quot;menutriggerover&quot;,a,a.menu,b)},onMenuTriggerOut:function(b){var a=this;delete a.overMenuTrigger;a.fireEvent(&quot;menutriggerout&quot;,a,a.menu,b)},enable:function(a){var b=this;b.callParent(arguments);b.removeClsWithUI(&quot;disabled&quot;);return b},disable:function(a){var b=this;b.callParent(arguments);b.addClsWithUI(&quot;disabled&quot;);b.removeClsWithUI(b.overCls);return b},setScale:function(c){var a=this,b=a.ui.replace(&quot;-&quot;+a.scale,&quot;&quot;);if(!Ext.Array.contains(a.allowedScales,c)){throw (&quot;#setScale: scale must be an allowed scale (&quot;+a.allowedScales.join(&quot;, &quot;)+&quot;)&quot;)}a.scale=c;a.setUI(b)},setUI:function(b){var a=this;if(a.scale&amp;&amp;!b.match(a.scale)){b=b+&quot;-&quot;+a.scale}a.callParent([b])},onFocus:function(b){var a=this;if(!a.disabled){a.addClsWithUI(a.focusCls)}},onBlur:function(b){var a=this;a.removeClsWithUI(a.focusCls)},onMouseDown:function(b){var a=this;if(!a.disabled&amp;&amp;b.button===0){a.addClsWithUI(a.pressedCls);a.doc.on(&quot;mouseup&quot;,a.onMouseUp,a)}},onMouseUp:function(b){var a=this;if(b.button===0){if(!a.pressed){a.removeClsWithUI(a.pressedCls)}a.doc.un(&quot;mouseup&quot;,a.onMouseUp,a)}},onMenuShow:function(b){var a=this;a.ignoreNextClick=0;a.addClsWithUI(a.menuActiveCls);a.fireEvent(&quot;menushow&quot;,a,a.menu)},onMenuHide:function(b){var a=this;a.removeClsWithUI(a.menuActiveCls);a.ignoreNextClick=Ext.defer(a.restoreClick,250,a);a.fireEvent(&quot;menuhide&quot;,a,a.menu)},restoreClick:function(){this.ignoreNextClick=0},onDownKey:function(){var a=this;if(!a.disabled){if(a.menu){a.showMenu()}}},getPersistentBtnPadding:function(){var a=Ext.button.Button,e=a.persistentPadding,c,b,d,f;if(!e){e=a.persistentPadding=[0,0,0,0];if(!Ext.isIE){c=Ext.create(&quot;Ext.button.Button&quot;,{renderTo:Ext.getBody(),text:&quot;test&quot;,style:&quot;position:absolute;top:-999px;&quot;});d=c.btnEl;f=c.btnInnerEl;d.setSize(null,null);b=f.getOffsetsTo(d);e[0]=b[1];e[1]=d.getWidth()-f.getWidth()-b[0];e[2]=d.getHeight()-f.getHeight()-b[1];e[3]=b[0];c.destroy()}}return e}},function(){var a={};function b(e,h){var f,d,c;if(h){f=a[e.toggleGroup];for(d=0,c=f.length;d&lt;c;d++){if(f[d]!==e){f[d].toggle(false)}}}}Ext.ButtonToggleManager={register:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(!d){d=a[c.toggleGroup]=[]}d.push(c);c.on(&quot;toggle&quot;,b)},unregister:function(c){if(!c.toggleGroup){return}var d=a[c.toggleGroup];if(d){Ext.Array.remove(d,c);c.un(&quot;toggle&quot;,b)}},getPressed:function(f){var e=a[f],d=0,c;if(e){for(c=e.length;d&lt;c;d++){if(e[d].pressed===true){return e[d]}}}return null}}});Ext.define(&quot;Ext.layout.container.boxOverflow.Menu&quot;,{extend:&quot;Ext.layout.container.boxOverflow.None&quot;,requires:[&quot;Ext.toolbar.Separator&quot;,&quot;Ext.button.Button&quot;],alternateClassName:&quot;Ext.layout.boxOverflow.Menu&quot;,noItemsMenuText:'&lt;div class=&quot;'+Ext.baseCSSPrefix+'toolbar-no-items&quot;&gt;(None)&lt;/div&gt;',constructor:function(b){var a=this;a.callParent(arguments);b.beforeLayout=Ext.Function.createInterceptor(b.beforeLayout,this.clearOverflow,this);a.afterCtCls=a.afterCtCls||Ext.baseCSSPrefix+&quot;box-menu-&quot;+b.parallelAfter;a.menuItems=[]},onRemove:function(a){Ext.Array.remove(this.menuItems,a)},handleOverflow:function(a,g){var f=this,e=f.layout,c=&quot;get&quot;+e.parallelPrefixCap,b={},d=[null,null];f.callParent(arguments);this.createMenu(a,g);b[e.perpendicularPrefix]=g[e.perpendicularPrefix];b[e.parallelPrefix]=g[e.parallelPrefix]-f.afterCt[c]();d[e.perpendicularSizeIndex]=(a.meta.maxSize-f.menuTrigger[&quot;get&quot;+e.perpendicularPrefixCap]())/2;f.menuTrigger.setPosition.apply(f.menuTrigger,d);return{targetSize:b}},clearOverflow:function(a,h){var g=this,f=h?h.width+(g.afterCt?g.afterCt.getWidth():0):0,b=g.menuItems,c=0,e=b.length,d;g.hideTrigger();for(;c&lt;e;c++){b[c].show()}b.length=0;return h?{targetSize:{height:h.height,width:f}}:null},showTrigger:function(){this.menuTrigger.show()},hideTrigger:function(){if(this.menuTrigger!==undefined){this.menuTrigger.hide()}},beforeMenuShow:function(h){var g=this,b=g.menuItems,d=0,a=b.length,f,e;var c=function(j,i){return j.isXType(&quot;buttongroup&quot;)&amp;&amp;!(i instanceof Ext.toolbar.Separator)};g.clearMenu();h.removeAll();for(;d&lt;a;d++){f=b[d];if(!d&amp;&amp;(f instanceof Ext.toolbar.Separator)){continue}if(e&amp;&amp;(c(f,e)||c(e,f))){h.add(&quot;-&quot;)}g.addComponentToMenu(h,f);e=f}if(h.items.length&lt;1){h.add(g.noItemsMenuText)}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,[&quot;iconCls&quot;,&quot;icon&quot;,&quot;itemId&quot;,&quot;disabled&quot;,&quot;handler&quot;,&quot;scope&quot;,&quot;menu&quot;]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a,destroyMenu:false});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(f,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(c,a){var b=this;if(a instanceof Ext.toolbar.Separator){c.add(&quot;-&quot;)}else{if(a.isComponent){if(a.isXType(&quot;splitbutton&quot;)){c.add(b.createMenuConfig(a,true))}else{if(a.isXType(&quot;button&quot;)){c.add(b.createMenuConfig(a,!a.menu))}else{if(a.isXType(&quot;buttongroup&quot;)){a.items.each(function(d){b.addComponentToMenu(c,d)})}else{c.add(Ext.create(Ext.getClassName(a),b.createMenuConfig(a)))}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&amp;&amp;a.items){a.items.each(function(b){if(b.menu){delete b.menu}})}},createMenu:function(a,c){var k=this,h=k.layout,l=h.parallelBefore,e=h.parallelPrefix,b=c[e],g=a.boxes,d=0,j=g.length,f;if(!k.menuTrigger){k.createInnerElements();k.menu=Ext.create(&quot;Ext.menu.Menu&quot;,{listeners:{scope:k,beforeshow:k.beforeMenuShow}});k.menuTrigger=Ext.create(&quot;Ext.button.Button&quot;,{ownerCt:k.layout.owner,iconCls:k.layout.owner.menuTriggerCls,ui:h.owner instanceof Ext.toolbar.Toolbar?&quot;default-toolbar&quot;:&quot;default&quot;,menu:k.menu,getSplitCls:function(){return&quot;&quot;},renderTo:k.afterCt})}k.showTrigger();b-=k.afterCt.getWidth();k.menuItems.length=0;for(;d&lt;j;d++){f=g[d];if(f[l]+f[e]&gt;b){k.menuItems.push(f.component);f.component.hide()}}},createInnerElements:function(){var a=this,b=a.layout.getRenderTarget();if(!this.afterCt){b.addCls(Ext.baseCSSPrefix+a.layout.direction+&quot;-box-overflow-body&quot;);this.afterCt=b.insertSibling({cls:Ext.layout.container.Box.prototype.innerCls+&quot; &quot;+this.afterCtCls},&quot;before&quot;)}},destroy:function(){Ext.destroy(this.menu,this.menuTrigger)}});Ext.define(&quot;Ext.layout.container.Box&quot;,{alias:[&quot;layout.box&quot;],extend:&quot;Ext.layout.container.Container&quot;,alternateClassName:&quot;Ext.layout.BoxLayout&quot;,requires:[&quot;Ext.layout.container.boxOverflow.None&quot;,&quot;Ext.layout.container.boxOverflow.Menu&quot;,&quot;Ext.layout.container.boxOverflow.Scroller&quot;,&quot;Ext.util.Format&quot;,&quot;Ext.dd.DragDropManager&quot;],defaultMargins:{top:0,right:0,bottom:0,left:0},padding:&quot;0&quot;,pack:&quot;start&quot;,type:&quot;box&quot;,scrollOffset:0,itemCls:Ext.baseCSSPrefix+&quot;box-item&quot;,targetCls:Ext.baseCSSPrefix+&quot;box-layout-ct&quot;,innerCls:Ext.baseCSSPrefix+&quot;box-inner&quot;,bindToOwnerCtContainer:true,availableSpaceOffset:0,reserveOffset:true,shrinkToFit:true,clearInnerCtOnLayout:false,flexSortFn:function(d,c){var e=&quot;max&quot;+this.parallelPrefixCap,f=Infinity;d=d.component[e]||f;c=c.component[e]||f;if(!isFinite(d)&amp;&amp;!isFinite(c)){return false}return d-c},minSizeSortFn:function(d,c){return c.available-d.available},constructor:function(a){var b=this;b.callParent(arguments);b.flexSortFn=Ext.Function.bind(b.flexSortFn,b);b.initOverflowHandler()},getChildBox:function(b){b=b.el||this.owner.getComponent(b).el;var a=b.getBox(false,true);return{left:a.left,top:a.top,width:a.width,height:a.height}},calculateChildBox:function(e){var d=this,b=d.calculateChildBoxes(d.getVisibleItems(),d.getLayoutTargetSize()).boxes,c=b.length,a=0;e=d.owner.getComponent(e);for(;a&lt;c;a++){if(b[a].component===e){return b[a]}}},calculateChildBoxes:function(p,b){var x=this,J=Math,l=J.max,o=Infinity,v,s=x.parallelPrefix,n=x.parallelPrefixCap,M=x.perpendicularPrefix,t=x.perpendicularPrefixCap,C=&quot;min&quot;+n,F=&quot;min&quot;+t,ak=&quot;max&quot;+t,c=b[s]-x.scrollOffset,Z=b[M],ae=x.padding,r=ae[x.parallelBefore],u=r+ae[x.parallelAfter],P=ae[x.perpendicularLeftTop],K=P+ae[x.perpendicularRightBottom],ah=l(0,Z-K),aj=x.innerCt.getBorderWidth(x.perpendicularLT+x.perpendicularRB),ab=x.pack==&quot;start&quot;,an=x.pack==&quot;center&quot;,E=x.pack==&quot;end&quot;,ad=Ext.Number.constrain,N=p.length,d=0,ai=0,al=0,w=0,G=0,Q=[],L=[],ag,af,h,aa,A,B,am,Y,W,X,m,e,z,I,y,O,j,R,ac,f,D,T,a,q,k,H,S,V,g,U;for(af=0;af&lt;N;af++){h=p[af];A=h[M];if(!h.flex||!(x.align==&quot;stretch&quot;||x.align==&quot;stretchmax&quot;)){if(h.componentLayout.initialized!==true){x.layoutItem(h)}}B=h.margins;H=B[x.parallelBefore]+B[x.parallelAfter];W={component:h,margins:B};if(h.flex){ai+=h.flex;aa=v}else{if(!(h[s]&amp;&amp;A)){am=h.getSize()}aa=h[s]||am[s];A=A||am[M]}d+=H+(aa||0);al+=H+(h.flex?h[C]||0:aa);w+=H+(h[C]||aa||0);if(typeof A!=&quot;number&quot;){A=h[&quot;get&quot;+t]()}G=l(G,l(A,h[F]||0)+B[x.perpendicularLeftTop]+B[x.perpendicularRightBottom]);W[s]=aa||v;W.dirtySize=h.componentLayout.lastComponentSize?(W[s]!==h.componentLayout.lastComponentSize[s]):false;W[M]=A||v;Q.push(W)}if(!x.autoSize){X=al-c;m=w&gt;c}e=l(0,c-d-u-(x.reserveOffset?x.availableSpaceOffset:0));if(m){for(af=0;af&lt;N;af++){j=Q[af];z=p[af][C]||p[af][s]||j[s];j.dirtySize=j.dirtySize||j[s]!=z;j[s]=z}}else{if(X&gt;0){for(af=0;af&lt;N;af++){I=p[af];z=I[C]||0;if(I.flex){j=Q[af];j.dirtySize=j.dirtySize||j[s]!=z;j[s]=z}else{if(x.shrinkToFit){L.push({minSize:z,available:Q[af][s]-z,index:af})}}}Ext.Array.sort(L,x.minSizeSortFn);for(af=0,y=L.length;af&lt;y;af++){O=L[af].index;if(O==v){continue}I=p[O];z=L[af].minSize;j=Q[O];R=j[s];ac=l(z,R-J.ceil(X/(y-af)));f=R-ac;j.dirtySize=j.dirtySize||j[s]!=ac;j[s]=ac;X-=f}m=(X&gt;0)}else{a=e;q=ai;T=[];for(af=0;af&lt;N;af++){h=p[af];if(ab&amp;&amp;h.flex){T.push(Q[Ext.Array.indexOf(p,h)])}}Ext.Array.sort(T,x.flexSortFn);for(af=0;af&lt;T.length;af++){S=T[af];h=S.component;B=S.margins;k=J.ceil((h.flex/q)*a);k=Math.max(h[&quot;min&quot;+n]||0,J.min(h[&quot;max&quot;+n]||o,k));a-=k;q-=h.flex;S.dirtySize=S.dirtySize||S[s]!=k;S[s]=k}}}if(an){r+=e/2}else{if(E){r+=e}}if(x.owner.dock&amp;&amp;(Ext.isIE6||Ext.isIE7||Ext.isIEQuirks)&amp;&amp;!x.owner.width&amp;&amp;x.direction==&quot;vertical&quot;){ag=G+x.owner.el.getPadding(&quot;lr&quot;)+x.owner.el.getBorderWidth(&quot;lr&quot;);if(x.owner.frameSize){ag+=x.owner.frameSize.left+x.owner.frameSize.right}ah=Math.min(ah,b.width=G+ae.left+ae.right)}for(af=0;af&lt;N;af++){h=p[af];S=Q[af];B=S.margins;g=B[x.perpendicularLeftTop]+B[x.perpendicularRightBottom];r+=B[x.parallelBefore];S[x.parallelBefore]=r;S[x.perpendicularLeftTop]=P+B[x.perpendicularLeftTop];if(x.align==&quot;stretch&quot;){U=ad(ah-g,h[F]||0,h[ak]||o);S.dirtySize=S.dirtySize||S[M]!=U;S[M]=U}else{if(x.align==&quot;stretchmax&quot;){U=ad(G-g,h[F]||0,h[ak]||o);S.dirtySize=S.dirtySize||S[M]!=U;S[M]=U}else{if(x.align==x.alignCenteringString){D=l(ah,G)-aj-S[M];if(D&gt;0){S[x.perpendicularLeftTop]=P+Math.round(D/2)}}}}r+=(S[s]||0)+B[x.parallelAfter]}return{boxes:Q,meta:{calculatedWidth:ag,maxSize:G,nonFlexSize:d,desiredSize:al,minimumSize:w,shortfall:X,tooNarrow:m}}},onRemove:function(a){this.callParent(arguments);if(this.overflowHandler){this.overflowHandler.onRemove(a)}},initOverflowHandler:function(){var c=this.overflowHandler;if(typeof c==&quot;string&quot;){c={type:c}}var b=&quot;None&quot;;if(c&amp;&amp;c.type!==undefined){b=c.type}var a=Ext.layout.container.boxOverflow[b];if(a[this.type]){a=a[this.type]}this.overflowHandler=Ext.create(&quot;Ext.layout.container.boxOverflow.&quot;+b,this,c)},onLayout:function(){this.callParent();if(this.clearInnerCtOnLayout===true&amp;&amp;this.adjustmentPass!==true){this.innerCt.setSize(null,null)}var g=this,c=g.getLayoutTargetSize(),f=g.getVisibleItems(),b=g.calculateChildBoxes(f,c),e=b.boxes,h=b.meta,i,a,d;if(g.autoSize&amp;&amp;b.meta.desiredSize){c[g.parallelPrefix]=b.meta.desiredSize}if(h.shortfall&gt;0){i=g.overflowHandler;a=h.tooNarrow?&quot;handleOverflow&quot;:&quot;clearOverflow&quot;;d=i[a](b,c);if(d){if(d.targetSize){c=d.targetSize}if(d.recalculate){f=g.getVisibleItems();b=g.calculateChildBoxes(f,c);e=b.boxes}}}else{g.overflowHandler.clearOverflow()}g.layoutTargetLastSize=c;g.childBoxCache=b;g.updateInnerCtSize(c,b);g.updateChildBoxes(e);g.handleTargetOverflow(c)},animCallback:Ext.emptyFn,updateChildBoxes:function(g){var l=this,e=0,c=g.length,o=[],n=Ext.dd.DDM.getDDById(l.innerCt.id),a,f,d,h,j,b;for(;e&lt;c;e++){f=g[e];h=f.component;if(n&amp;&amp;(n.getDragEl()===h.el.dom)){continue}d=false;a=l.getChildBox(h);if(l.animate){b=l.animate.callback||l.animate;j={layoutAnimation:true,target:h,from:{},to:{},listeners:{}};if(!isNaN(f.width)&amp;&amp;(f.width!=a.width)){d=true;j.to.width=f.width}if(!isNaN(f.height)&amp;&amp;(f.height!=a.height)){d=true;j.to.height=f.height}if(!isNaN(f.left)&amp;&amp;(f.left!=a.left)){d=true;j.to.left=f.left}if(!isNaN(f.top)&amp;&amp;(f.top!=a.top)){d=true;j.to.top=f.top}if(d){o.push(j)}}else{if(f.dirtySize){if(f.width!==a.width||f.height!==a.height){l.setItemSize(h,f.width,f.height)}}if(isNaN(f.left)||isNaN(f.top)){continue}h.setPosition(f.left,f.top)}}c=o.length;if(c){var m=function(i){c-=1;if(!c){l.animCallback(i);l.layoutBusy=false;if(Ext.isFunction(b)){b()}}};var k=function(){l.layoutBusy=true};for(e=0,c=o.length;e&lt;c;e++){j=o[e];j.listeners.afteranimate=m;if(!e){j.listeners.beforeanimate=k}if(l.animate.duration){j.duration=l.animate.duration}h=j.target;delete j.target;h.stopAnimation();h.animate(j)}}},updateInnerCtSize:function(c,a){var g=this,e=Math.max,f=g.align,h=g.padding,b=c.width,j=c.height,k=a.meta,d,i;if(g.direction==&quot;horizontal&quot;){d=b;i=k.maxSize+h.top+h.bottom+g.innerCt.getBorderWidth(&quot;tb&quot;);if(f==&quot;stretch&quot;){i=j}else{if(f==&quot;middle&quot;){i=e(j,i)}}}else{i=j;d=k.maxSize+h.left+h.right+g.innerCt.getBorderWidth(&quot;lr&quot;);if(f==&quot;stretch&quot;){d=b}else{if(f==&quot;center&quot;){d=e(b,d)}}}g.getRenderTarget().setSize(d||undefined,i||undefined);if(k.calculatedWidth&amp;&amp;g.owner.el.getWidth()&gt;k.calculatedWidth){g.owner.el.setWidth(k.calculatedWidth)}if(g.innerCt.dom.scrollTop){g.innerCt.dom.scrollTop=0}},handleTargetOverflow:function(c){var b=this.getTarget(),d=b.getStyle(&quot;overflow&quot;),a;if(d&amp;&amp;d!=&quot;hidden&quot;&amp;&amp;!this.adjustmentPass){a=this.getLayoutTargetSize();if(a.width!=c.width||a.height!=c.height){this.adjustmentPass=true;this.onLayout();return true}}delete this.adjustmentPass},isValidParent:function(c,d,a){var b=c.el?c.el.dom:Ext.getDom(c);return(b&amp;&amp;this.innerCt&amp;&amp;b.parentNode===this.innerCt.dom)||false},getRenderTarget:function(){if(!this.innerCt){this.innerCt=this.getTarget().createChild({cls:this.innerCls,role:&quot;presentation&quot;});this.padding=Ext.util.Format.parseBox(this.padding)}return this.innerCt},renderItem:function(d,f){this.callParent(arguments);var c=this,a=d.getEl(),b=a.dom.style,e=d.margins||d.margin;if(e){if(Ext.isString(e)||Ext.isNumber(e)){e=Ext.util.Format.parseBox(e)}else{Ext.applyIf(e,{top:0,right:0,bottom:0,left:0})}}else{e=Ext.apply({},c.defaultMargins)}e.top+=a.getMargin(&quot;t&quot;);e.right+=a.getMargin(&quot;r&quot;);e.bottom+=a.getMargin(&quot;b&quot;);e.left+=a.getMargin(&quot;l&quot;);e.height=e.top+e.bottom;e.width=e.left+e.right;b.marginTop=b.marginRight=b.marginBottom=b.marginLeft=&quot;0&quot;;d.margins=e},destroy:function(){Ext.destroy(this.innerCt,this.overflowHandler);this.callParent(arguments)}});Ext.define(&quot;Ext.layout.container.HBox&quot;,{alias:[&quot;layout.hbox&quot;],extend:&quot;Ext.layout.container.Box&quot;,alternateClassName:&quot;Ext.layout.HBoxLayout&quot;,align:&quot;top&quot;,alignCenteringString:&quot;middle&quot;,type:&quot;hbox&quot;,direction:&quot;horizontal&quot;,parallelSizeIndex:0,perpendicularSizeIndex:1,parallelPrefix:&quot;width&quot;,parallelPrefixCap:&quot;Width&quot;,parallelLT:&quot;l&quot;,parallelRB:&quot;r&quot;,parallelBefore:&quot;left&quot;,parallelBeforeCap:&quot;Left&quot;,parallelAfter:&quot;right&quot;,parallelPosition:&quot;x&quot;,perpendicularPrefix:&quot;height&quot;,perpendicularPrefixCap:&quot;Height&quot;,perpendicularLT:&quot;t&quot;,perpendicularRB:&quot;b&quot;,perpendicularLeftTop:&quot;top&quot;,perpendicularRightBottom:&quot;bottom&quot;,perpendicularPosition:&quot;y&quot;,configureItem:function(a){if(a.flex){a.layoutManagedWidth=1}else{a.layoutManagedWidth=2}if(this.align===&quot;stretch&quot;||this.align===&quot;stretchmax&quot;){a.layoutManagedHeight=1}else{a.layoutManagedHeight=2}this.callParent(arguments)}});Ext.define(&quot;Ext.layout.container.VBox&quot;,{alias:[&quot;layout.vbox&quot;],extend:&quot;Ext.layout.container.Box&quot;,alternateClassName:&quot;Ext.layout.VBoxLayout&quot;,align:&quot;left&quot;,alignCenteringString:&quot;center&quot;,type:&quot;vbox&quot;,direction:&quot;vertical&quot;,parallelSizeIndex:1,perpendicularSizeIndex:0,parallelPrefix:&quot;height&quot;,parallelPrefixCap:&quot;Height&quot;,parallelLT:&quot;t&quot;,parallelRB:&quot;b&quot;,parallelBefore:&quot;top&quot;,parallelBeforeCap:&quot;Top&quot;,parallelAfter:&quot;bottom&quot;,parallelPosition:&quot;y&quot;,perpendicularPrefix:&quot;width&quot;,perpendicularPrefixCap:&quot;Width&quot;,perpendicularLT:&quot;l&quot;,perpendicularRB:&quot;r&quot;,perpendicularLeftTop:&quot;left&quot;,perpendicularRightBottom:&quot;right&quot;,perpendicularPosition:&quot;x&quot;,configureItem:function(a){if(a.flex){a.layoutManagedHeight=1}else{a.layoutManagedHeight=2}if(this.align===&quot;stretch&quot;||this.align===&quot;stretchmax&quot;){a.layoutManagedWidth=1}else{a.layoutManagedWidth=2}this.callParent(arguments)}});Ext.define(&quot;Ext.toolbar.Toolbar&quot;,{extend:&quot;Ext.container.Container&quot;,requires:[&quot;Ext.toolbar.Fill&quot;,&quot;Ext.layout.container.HBox&quot;,&quot;Ext.layout.container.VBox&quot;,&quot;Ext.FocusManager&quot;],uses:[&quot;Ext.toolbar.Separator&quot;],alias:&quot;widget.toolbar&quot;,alternateClassName:&quot;Ext.Toolbar&quot;,isToolbar:true,baseCls:Ext.baseCSSPrefix+&quot;toolbar&quot;,ariaRole:&quot;toolbar&quot;,defaultType:&quot;button&quot;,vertical:false,enableOverflow:false,menuTriggerCls:Ext.baseCSSPrefix+&quot;toolbar-more-icon&quot;,trackMenus:true,itemCls:Ext.baseCSSPrefix+&quot;toolbar-item&quot;,initComponent:function(){var b=this,a;if(!b.layout&amp;&amp;b.enableOverflow){b.layout={overflowHandler:&quot;Menu&quot;}}if(b.dock===&quot;right&quot;||b.dock===&quot;left&quot;){b.vertical=true}b.layout=Ext.applyIf(Ext.isString(b.layout)?{type:b.layout}:b.layout||{},{type:b.vertical?&quot;vbox&quot;:&quot;hbox&quot;,align:b.vertical?&quot;stretchmax&quot;:&quot;middle&quot;,clearInnerCtOnLayout:true});if(b.vertical){b.addClsWithUI(&quot;vertical&quot;)}if(b.ui===&quot;footer&quot;){b.ignoreBorderManagement=true}b.callParent();b.addEvents(&quot;overflowchange&quot;);a=b.vertical?[&quot;up&quot;,&quot;down&quot;]:[&quot;left&quot;,&quot;right&quot;];Ext.FocusManager.subscribe(b,{keys:a})},getRefItems:function(a){var e=this,b=e.callParent(arguments),d=e.layout,c;if(a&amp;&amp;e.enableOverflow){c=d.overflowHandler;if(c&amp;&amp;c.menu){b=b.concat(c.menu.getRefItems(a))}}return b},lookupComponent:function(b){if(Ext.isString(b)){var a=Ext.toolbar.Toolbar.shortcuts[b];if(a){b={xtype:a}}else{b={xtype:&quot;tbtext&quot;,text:b}}this.applyDefaults(b)}return this.callParent(arguments)},applyDefaults:function(b){if(!Ext.isString(b)){b=this.callParent(arguments);var a=this.internalDefaults;if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}return b},trackMenu:function(c,a){if(this.trackMenus&amp;&amp;c.menu){var d=a?&quot;mun&quot;:&quot;mon&quot;,b=this;b[d](c,&quot;mouseover&quot;,b.onButtonOver,b);b[d](c,&quot;menushow&quot;,b.onButtonMenuShow,b);b[d](c,&quot;menuhide&quot;,b.onButtonMenuHide,b)}},constructButton:function(a){return a.events?a:this.createComponent(a,a.split?&quot;splitbutton&quot;:this.defaultType)},onBeforeAdd:function(a){if(a.is(&quot;field&quot;)||(a.is(&quot;button&quot;)&amp;&amp;this.ui!=&quot;footer&quot;)){a.ui=a.ui+&quot;-toolbar&quot;}if(a instanceof Ext.toolbar.Separator){a.setUI((this.vertical)?&quot;vertical&quot;:&quot;horizontal&quot;)}this.callParent(arguments)},onAdd:function(a){this.callParent(arguments);this.trackMenu(a);if(this.disabled){a.disable()}},onRemove:function(a){this.callParent(arguments);this.trackMenu(a,true)},onButtonOver:function(a){if(this.activeMenuBtn&amp;&amp;this.activeMenuBtn!=a){this.activeMenuBtn.hideMenu();a.showMenu();this.activeMenuBtn=a}},onButtonMenuShow:function(a){this.activeMenuBtn=a},onButtonMenuHide:function(a){delete this.activeMenuBtn}},function(){this.shortcuts={&quot;-&quot;:&quot;tbseparator&quot;,&quot; &quot;:&quot;tbspacer&quot;,&quot;-&gt;&quot;:&quot;tbfill&quot;}});Ext.define(&quot;Ext.panel.AbstractPanel&quot;,{extend:&quot;Ext.container.Container&quot;,requires:[&quot;Ext.util.MixedCollection&quot;,&quot;Ext.Element&quot;,&quot;Ext.toolbar.Toolbar&quot;],baseCls:Ext.baseCSSPrefix+&quot;panel&quot;,isPanel:true,componentLayout:&quot;dock&quot;,defaultDockWeights:{top:1,left:3,right:5,bottom:7},renderTpl:['&lt;div id=&quot;{id}-body&quot; class=&quot;{baseCls}-body&lt;tpl if=&quot;bodyCls&quot;&gt; {bodyCls}&lt;/tpl&gt;',' {baseCls}-body-{ui}&lt;tpl if=&quot;uiCls&quot;&gt;','&lt;tpl for=&quot;uiCls&quot;&gt; {parent.baseCls}-body-{parent.ui}-{.}&lt;/tpl&gt;','&lt;/tpl&gt;&quot;&lt;tpl if=&quot;bodyStyle&quot;&gt; style=&quot;{bodyStyle}&quot;&lt;/tpl&gt;&gt;',&quot;&lt;/div&gt;&quot;],border:true,initComponent:function(){var a=this;a.addEvents(&quot;bodyresize&quot;);a.addChildEls(&quot;body&quot;);if(a.frame&amp;&amp;a.border&amp;&amp;a.bodyBorder===undefined){a.bodyBorder=false}if(a.frame&amp;&amp;a.border&amp;&amp;(a.bodyBorder===false||a.bodyBorder===0)){a.manageBodyBorders=true}a.callParent()},initItems:function(){var b=this,a=b.dockedItems;b.callParent();b.dockedItems=Ext.create(&quot;Ext.util.MixedCollection&quot;,false,b.getComponentId);if(a){b.addDocked(a)}},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.dockedItems.get(a)},getComponent:function(a){var b=this.callParent(arguments);if(b===undefined&amp;&amp;!Ext.isNumber(a)){b=this.getDockedComponent(a)}return b},initBodyStyles:function(){var d=this,a=d.bodyStyle,c=[],b=Ext.Element,e;if(Ext.isFunction(a)){a=a()}if(Ext.isString(a)){c=a.split(&quot;;&quot;)}else{for(e in a){if(a.hasOwnProperty(e)){c.push(e+&quot;:&quot;+a[e])}}}if(d.bodyPadding!==undefined){c.push(&quot;padding: &quot;+b.unitizeBox((d.bodyPadding===true)?5:d.bodyPadding))}if(d.frame&amp;&amp;d.bodyBorder){if(!Ext.isNumber(d.bodyBorder)){d.bodyBorder=1}c.push(&quot;border-width: &quot;+b.unitizeBox(d.bodyBorder))}delete d.bodyStyle;return c.length?c.join(&quot;;&quot;):undefined},initBodyCls:function(){var b=this,a=&quot;&quot;,c=b.bodyCls;if(c){Ext.each(c,function(d){a+=&quot; &quot;+d});delete b.bodyCls}return a.length&gt;0?a:undefined},initRenderData:function(){return Ext.applyIf(this.callParent(),{bodyStyle:this.initBodyStyles(),bodyCls:this.initBodyCls()})},addDocked:function(a,f){var e=this,b=0,d,c;a=e.prepareItems(a);c=a.length;for(;b&lt;c;b++){d=a[b];d.dock=d.dock||&quot;top&quot;;if(e.border===false){}if(f!==undefined){e.dockedItems.insert(f+b,d)}else{e.dockedItems.add(d)}d.onAdded(e,b);e.onDockedAdd(d)}e.componentLayout.childrenChanged=true;if(e.rendered&amp;&amp;!e.suspendLayout){e.doComponentLayout()}return a},onDockedAdd:Ext.emptyFn,onDockedRemove:Ext.emptyFn,insertDocked:function(b,a){this.addDocked(a,b)},removeDocked:function(e,b){var d=this,c,a;if(!d.dockedItems.contains(e)){return e}c=d.componentLayout;a=c&amp;&amp;d.rendered;if(a){c.onRemove(e)}d.dockedItems.remove(e);e.onRemoved();d.onDockedRemove(e);if(b===true||(b!==false&amp;&amp;d.autoDestroy)){e.destroy()}else{if(a){c.afterRemove(e)}}d.componentLayout.childrenChanged=true;if(!d.destroying&amp;&amp;!d.suspendLayout){d.doComponentLayout()}return e},getDockedItems:function(c){var d=this,b=d.defaultDockWeights,a;if(d.dockedItems&amp;&amp;d.dockedItems.items.length){if(c){a=Ext.ComponentQuery.query(c,d.dockedItems.items)}else{a=d.dockedItems.items.slice()}Ext.Array.sort(a,function(f,e){var g=f.weight||b[f.dock],h=e.weight||b[e.dock];if(Ext.isNumber(g)&amp;&amp;Ext.isNumber(h)){return g-h}return 0});return a}return[]},addUIClsToElement:function(b,f){var e=this,a=e.callParent(arguments),d=[Ext.baseCSSPrefix+b,e.baseCls+&quot;-body-&quot;+b,e.baseCls+&quot;-body-&quot;+e.ui+&quot;-&quot;+b],g,c;if(!f&amp;&amp;e.rendered){if(e.bodyCls){e.body.addCls(e.bodyCls)}else{e.body.addCls(d)}}else{if(e.bodyCls){g=e.bodyCls.split(&quot; &quot;);for(c=0;c&lt;d.length;c++){if(!Ext.Array.contains(g,d[c])){g.push(d[c])}}e.bodyCls=g.join(&quot; &quot;)}else{e.bodyCls=d.join(&quot; &quot;)}}return a},removeUIClsFromElement:function(b,f){var e=this,a=e.callParent(arguments),d=[Ext.baseCSSPrefix+b,e.baseCls+&quot;-body-&quot;+b,e.baseCls+&quot;-body-&quot;+e.ui+&quot;-&quot;+b],g,c;if(!f&amp;&amp;e.rendered){if(e.bodyCls){e.body.removeCls(e.bodyCls)}else{e.body.removeCls(d)}}else{if(e.bodyCls){g=e.bodyCls.split(&quot; &quot;);for(c=0;c&lt;d.length;c++){Ext.Array.remove(g,d[c])}e.bodyCls=g.join(&quot; &quot;)}}return a},addUIToElement:function(c){var b=this,a=b.baseCls+&quot;-body-&quot;+b.ui,d;b.callParent(arguments);if(!c&amp;&amp;b.rendered){if(b.bodyCls){b.body.addCls(b.bodyCls)}else{b.body.addCls(a)}}else{if(b.bodyCls){d=b.bodyCls.split(&quot; &quot;);if(!Ext.Array.contains(d,a)){d.push(a)}b.bodyCls=d.join(&quot; &quot;)}else{b.bodyCls=a}}},removeUIFromElement:function(){var b=this,a=b.baseCls+&quot;-body-&quot;+b.ui,c;b.callParent(arguments);if(b.rendered){if(b.bodyCls){b.body.removeCls(b.bodyCls)}else{b.body.removeCls(a)}}else{if(b.bodyCls){c=b.bodyCls.split(&quot; &quot;);Ext.Array.remove(c,a);b.bodyCls=c.join(&quot; &quot;)}else{b.bodyCls=a}}},getTargetEl:function(){return this.body},getRefItems:function(a){var b=this.callParent(arguments),d=this.getDockedItems(a?&quot;*,* *&quot;:undefined),f=d.length,c=0,e;for(;c&lt;f;c++){e=d[c];if(e.dock===&quot;right&quot;||e.dock===&quot;bottom&quot;){break}}return Ext.Array.splice(d,0,c).concat(b).concat(d)},beforeDestroy:function(){var b=this.dockedItems,a;if(b){while((a=b.first())){this.removeDocked(a,true)}}this.callParent()},setBorder:function(a){var b=this;b.border=(a!==undefined)?a:true;if(b.rendered){b.doComponentLayout()}}});Ext.define(&quot;Ext.panel.Panel&quot;,{extend:&quot;Ext.panel.AbstractPanel&quot;,requires:[&quot;Ext.panel.Header&quot;,&quot;Ext.fx.Anim&quot;,&quot;Ext.util.KeyMap&quot;,&quot;Ext.panel.DD&quot;,&quot;Ext.XTemplate&quot;,&quot;Ext.layout.component.Dock&quot;,&quot;Ext.util.Memento&quot;],alias:&quot;widget.panel&quot;,alternateClassName:&quot;Ext.Panel&quot;,collapsedCls:&quot;collapsed&quot;,animCollapse:Ext.enableFx,minButtonWidth:75,collapsed:false,collapseFirst:true,hideCollapseTool:false,titleCollapse:false,floatable:true,collapsible:false,closable:false,closeAction:&quot;destroy&quot;,preventHeader:false,headerPosition:&quot;top&quot;,frame:false,frameHeader:true,initComponent:function(){var b=this,a;b.addEvents(&quot;beforeclose&quot;,&quot;beforeexpand&quot;,&quot;beforecollapse&quot;,&quot;expand&quot;,&quot;collapse&quot;,&quot;titlechange&quot;,&quot;iconchange&quot;);this.addStateEvents(&quot;expand&quot;,&quot;collapse&quot;);if(b.unstyled){b.setUI(&quot;plain&quot;)}if(b.frame){b.setUI(b.ui+&quot;-framed&quot;)}b.bridgeToolbars();b.callParent();b.collapseDirection=b.collapseDirection||b.headerPosition||Ext.Component.DIRECTION_TOP},setBorder:function(a){this.callParent(arguments)},beforeDestroy:function(){Ext.destroy(this.ghostPanel,this.dd);this.callParent()},initAria:function(){this.callParent();this.initHeaderAria()},initHeaderAria:function(){var b=this,a=b.el,c=b.header;if(a&amp;&amp;c){a.dom.setAttribute(&quot;aria-labelledby&quot;,c.titleCmp.id)}},getHeader:function(){return this.header},setTitle:function(c){var b=this,a=this.title;b.title=c;if(b.header){b.header.setTitle(c)}else{b.updateHeader()}if(b.reExpander){b.reExpander.setTitle(c)}b.fireEvent(&quot;titlechange&quot;,b,c,a)},setIconCls:function(a){var c=this,b=c.iconCls;c.iconCls=a;var d=c.header;if(d){d.setIconCls(a)}c.fireEvent(&quot;iconchange&quot;,c,a,b)},bridgeToolbars:function(){var a=this,f=[],c,b,e=a.minButtonWidth;function d(g,i,h){if(Ext.isArray(g)){g={xtype:&quot;toolbar&quot;,items:g}}else{if(!g.xtype){g.xtype=&quot;toolbar&quot;}}g.dock=i;if(i==&quot;left&quot;||i==&quot;right&quot;){g.vertical=true}if(h){g.layout=Ext.applyIf(g.layout||{},{pack:{left:&quot;start&quot;,center:&quot;center&quot;}[a.buttonAlign]||&quot;end&quot;})}return g}if(a.tbar){f.push(d(a.tbar,&quot;top&quot;));a.tbar=null}if(a.bbar){f.push(d(a.bbar,&quot;bottom&quot;));a.bbar=null}if(a.buttons){a.fbar=a.buttons;a.buttons=null}if(a.fbar){c=d(a.fbar,&quot;bottom&quot;,true);c.ui=&quot;footer&quot;;if(e){b=c.defaults;c.defaults=function(g){var h=b||{};if((!g.xtype||g.xtype===&quot;button&quot;||(g.isComponent&amp;&amp;g.isXType(&quot;button&quot;)))&amp;&amp;!(&quot;minWidth&quot; in h)){h=Ext.apply({minWidth:e},h)}return h}}f.push(c);a.fbar=null}if(a.lbar){f.push(d(a.lbar,&quot;left&quot;));a.lbar=null}if(a.rbar){f.push(d(a.rbar,&quot;right&quot;));a.rbar=null}if(a.dockedItems){if(!Ext.isArray(a.dockedItems)){a.dockedItems=[a.dockedItems]}a.dockedItems=a.dockedItems.concat(f)}else{a.dockedItems=f}},initTools:function(){var a=this;a.tools=a.tools?Ext.Array.clone(a.tools):[];if(a.collapsible&amp;&amp;!(a.hideCollapseTool||a.header===false)){a.collapseDirection=a.collapseDirection||a.headerPosition||&quot;top&quot;;a.collapseTool=a.expandTool=a.createComponent({xtype:&quot;tool&quot;,type:&quot;collapse-&quot;+a.collapseDirection,expandType:a.getOppositeDirection(a.collapseDirection),handler:a.toggleCollapse,scope:a});if(a.collapseFirst){a.tools.unshift(a.collapseTool)}}a.addTools();if(a.closable){a.addClsWithUI(&quot;closable&quot;);a.addTool({type:&quot;close&quot;,handler:Ext.Function.bind(a.close,this,[])})}if(a.collapseTool&amp;&amp;!a.collapseFirst){a.tools.push(a.collapseTool)}},addTools:Ext.emptyFn,close:function(){if(this.fireEvent(&quot;beforeclose&quot;,this)!==false){this.doClose()}},doClose:function(){this.fireEvent(&quot;close&quot;,this);this[this.closeAction]()},onRender:function(b,a){var d=this,c;d.initTools();d.updateHeader();d.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);if(a.collapsed){a.collapsed=false;a.collapse(null,false,true)}},updateHeader:function(b){var a=this,e=a.header,d=a.title,c=a.tools;if(!a.preventHeader&amp;&amp;(b||d||(c&amp;&amp;c.length))){if(!e){e=a.header=Ext.create(&quot;Ext.panel.Header&quot;,{title:d,orientation:(a.headerPosition==&quot;left&quot;||a.headerPosition==&quot;right&quot;)?&quot;vertical&quot;:&quot;horizontal&quot;,dock:a.headerPosition||&quot;top&quot;,textCls:a.headerTextCls,iconCls:a.iconCls,baseCls:a.baseCls+&quot;-header&quot;,tools:c,ui:a.ui,indicateDrag:a.draggable,border:a.border,frame:a.frame&amp;&amp;a.frameHeader,ignoreParentFrame:a.frame||a.overlapHeader,ignoreBorderManagement:a.frame||a.ignoreHeaderBorderManagement,listeners:a.collapsible&amp;&amp;a.titleCollapse?{click:a.toggleCollapse,scope:a}:null});a.addDocked(e,0);a.tools=e.tools}e.show();a.initHeaderAria()}else{if(e){e.hide()}}},setUI:function(b){var a=this;a.callParent(arguments);if(a.header){a.header.setUI(b)}},getContentTarget:function(){return this.body},getTargetEl:function(){return this.body||this.frameBody||this.el},isVisible:function(a){var b=this;if(b.collapsed&amp;&amp;b.placeholder){return b.placeholder.isVisible(a)}return b.callParent(arguments)},onHide:function(){var a=this;if(a.collapsed&amp;&amp;a.placeholder){a.placeholder.hide()}else{a.callParent(arguments)}},onShow:function(){var a=this;if(a.collapsed&amp;&amp;a.placeholder){a.hidden=true;a.placeholder.show()}else{a.callParent(arguments)}},addTool:function(a){var b=this,c=b.header;if(Ext.isArray(a)){Ext.each(a,b.addTool,b);return}b.tools.push(a);if(c){c.addTool(a)}b.updateHeader()},getOppositeDirection:function(a){var b=Ext.Component;switch(a){case b.DIRECTION_TOP:return b.DIRECTION_BOTTOM;case b.DIRECTION_RIGHT:return b.DIRECTION_LEFT;case b.DIRECTION_BOTTOM:return b.DIRECTION_TOP;case b.DIRECTION_LEFT:return b.DIRECTION_RIGHT}},collapse:function(t,f,h){var u=this,s=Ext.Component,j=u.getHeight(),k=u.getWidth(),v,a=0,p=u.dockedItems.items,q=p.length,o=0,r,g,n={from:{height:j,width:k},to:{height:j,width:k},listeners:{afteranimate:u.afterCollapse,scope:u},duration:Ext.Number.from(f,Ext.fx.Anim.prototype.duration)},e,d,l,b,m;if(!t){t=u.collapseDirection}if(h){f=false}else{if(u.collapsed||u.fireEvent(&quot;beforecollapse&quot;,u,t,f)===false){return false}}l=t;u.expandDirection=u.getOppositeDirection(t);u.hiddenDocked=[];switch(t){case s.DIRECTION_TOP:case s.DIRECTION_BOTTOM:d=&quot;horizontal&quot;;m=&quot;height&quot;;b=&quot;getHeight&quot;;for(;o&lt;q;o++){r=p[o];if(r.isVisible()){if(r.isXType(&quot;header&quot;,true)&amp;&amp;(!r.dock||r.dock==&quot;top&quot;||r.dock==&quot;bottom&quot;)){e=r}else{u.hiddenDocked.push(r)}}else{if(r===u.reExpander){e=r}}}if(t==Ext.Component.DIRECTION_BOTTOM){g=u.getPosition()[1]-Ext.fly(u.el.dom.offsetParent).getRegion().top;n.from.top=g}break;case s.DIRECTION_LEFT:case s.DIRECTION_RIGHT:d=&quot;vertical&quot;;m=&quot;width&quot;;b=&quot;getWidth&quot;;for(;o&lt;q;o++){r=p[o];if(r.isVisible()){if(r.isHeader&amp;&amp;(r.dock==&quot;left&quot;||r.dock==&quot;right&quot;)){e=r}else{u.hiddenDocked.push(r)}}else{if(r===u.reExpander){e=r}}}if(t==Ext.Component.DIRECTION_RIGHT){g=u.getPosition()[0]-Ext.fly(u.el.dom.offsetParent).getRegion().left;n.from.left=g}break;default:throw (&quot;Panel collapse must be passed a valid Component collapse direction&quot;)}if(f&amp;&amp;u.collapseTool){u.collapseTool.disable()}u.addClsWithUI(u.collapsedCls);if(e&amp;&amp;e.rendered){e.addClsWithUI(u.collapsedCls);e.addClsWithUI(u.collapsedCls+&quot;-&quot;+e.dock);if(u.border&amp;&amp;(!u.frame||(u.frame&amp;&amp;Ext.supports.CSS3BorderRadius))){e.addClsWithUI(u.collapsedCls+&quot;-border-&quot;+e.dock)}v=e.getFrameInfo();a=e[b]()+(v?v[t]:0);e.removeClsWithUI(u.collapsedCls);e.removeClsWithUI(u.collapsedCls+&quot;-&quot;+e.dock);if(u.border&amp;&amp;(!u.frame||(u.frame&amp;&amp;Ext.supports.CSS3BorderRadius))){e.removeClsWithUI(u.collapsedCls+&quot;-border-&quot;+e.dock)}}else{e={hideMode:&quot;offsets&quot;,temporary:true,title:u.title,orientation:d,dock:l,textCls:u.headerTextCls,iconCls:u.iconCls,baseCls:u.baseCls+&quot;-header&quot;,ui:u.ui,frame:u.frame&amp;&amp;u.frameHeader,ignoreParentFrame:u.frame||u.overlapHeader,indicateDrag:u.draggable,cls:u.baseCls+&quot;-collapsed-placeholder  &quot;+Ext.baseCSSPrefix+&quot;docked &quot;+u.baseCls+&quot;-&quot;+u.ui+&quot;-collapsed&quot;,renderTo:u.el};if(!u.hideCollapseTool){e[(e.orientation==&quot;horizontal&quot;)?&quot;tools&quot;:&quot;items&quot;]=[{xtype:&quot;tool&quot;,type:&quot;expand-&quot;+u.expandDirection,handler:u.toggleCollapse,scope:u}]}e=u.reExpander=Ext.create(&quot;Ext.panel.Header&quot;,e);a=e[b]()+((e.frame)?e.frameSize[t]:0);e.hide();u.insertDocked(0,e)}u.reExpander=e;u.reExpander.addClsWithUI(u.collapsedCls);u.reExpander.addClsWithUI(u.collapsedCls+&quot;-&quot;+e.dock);if(u.border&amp;&amp;(!u.frame||(u.frame&amp;&amp;Ext.supports.CSS3BorderRadius))){u.reExpander.addClsWithUI(u.collapsedCls+&quot;-border-&quot;+u.reExpander.dock)}if(t==Ext.Component.DIRECTION_RIGHT){n.to.left=g+(k-a)}else{if(t==Ext.Component.DIRECTION_BOTTOM){n.to.top=g+(j-a)}}n.to[m]=a;if(!u.collapseMemento){u.collapseMemento=new Ext.util.Memento(u)}u.collapseMemento.capture([&quot;width&quot;,&quot;height&quot;,&quot;minWidth&quot;,&quot;minHeight&quot;,&quot;layoutManagedHeight&quot;,&quot;layoutManagedWidth&quot;]);u.savedFlex=u.flex;u.minWidth=0;u.minHeight=0;delete u.flex;u.suspendLayout=true;if(f){u.animate(n)}else{u.setSize(n.to.width,n.to.height);if(Ext.isDefined(n.to.left)||Ext.isDefined(n.to.top)){u.setPosition(n.to.left,n.to.top)}u.afterCollapse(false,h)}return u},afterCollapse:function(e,b){var d=this,c=0,a=d.hiddenDocked.length;d.collapseMemento.restore([&quot;minWidth&quot;,&quot;minHeight&quot;]);if(Ext.Component.VERTICAL_DIRECTION_Re.test(d.expandDirection)){d.layoutManagedHeight=2;d.collapseMemento.restore(&quot;width&quot;,false)}else{d.layoutManagedWidth=2;d.collapseMemento.restore(&quot;height&quot;,false)}d.saveScrollTop=d.body.dom.scrollTop;d.body.setStyle(&quot;display&quot;,&quot;none&quot;);for(;c&lt;a;c++){d.hiddenDocked[c].hide()}if(d.reExpander){d.reExpander.updateFrame();d.reExpander.show()}d.collapsed=true;d.suspendLayout=false;if(!b){if(d.ownerCt){if(e){d.ownerCt.layout.layout()}}else{if(d.reExpander.temporary){d.doComponentLayout()}}}if(d.resizer){d.resizer.disable()}if(d.collapseTool){d.collapseTool.setType(&quot;expand-&quot;+d.expandDirection)}if(!b){d.fireEvent(&quot;collapse&quot;,d)}if(e&amp;&amp;d.collapseTool){d.collapseTool.enable()}},expand:function(b){var f=this;if(!f.collapsed||f.fireEvent(&quot;beforeexpand&quot;,f,b)===false){return false}var e=0,c=f.hiddenDocked.length,h=f.expandDirection,j=f.getHeight(),a=f.getWidth(),g,d;if(b&amp;&amp;f.collapseTool){f.collapseTool.disable()}for(;e&lt;c;e++){f.hiddenDocked[e].hidden=false;f.hiddenDocked[e].el.show()}if(f.reExpander){if(f.reExpander.temporary){f.reExpander.hide()}else{f.reExpander.removeClsWithUI(f.collapsedCls);f.reExpander.removeClsWithUI(f.collapsedCls+&quot;-&quot;+f.reExpander.dock);if(f.border&amp;&amp;(!f.frame||(f.frame&amp;&amp;Ext.supports.CSS3BorderRadius))){f.reExpander.removeClsWithUI(f.collapsedCls+&quot;-border-&quot;+f.reExpander.dock)}f.reExpander.updateFrame()}}if(f.collapseTool){f.collapseTool.setType(&quot;collapse-&quot;+f.collapseDirection)}f.body.setStyle(&quot;display&quot;,&quot;&quot;);f.body.dom.scrollTop=f.saveScrollTop;f.collapsed=false;f.removeClsWithUI(f.collapsedCls);d={to:{},from:{height:j,width:a},listeners:{afteranimate:f.afterExpand,scope:f}};if((h==Ext.Component.DIRECTION_TOP)||(h==Ext.Component.DIRECTION_BOTTOM)){f.collapseMemento.restore(&quot;height&quot;,false);if(f.height===undefined){f.setCalculatedSize(f.width,null);d.to.height=f.getHeight();f.setCalculatedSize(f.width,d.from.height)}else{if(f.savedFlex){f.flex=f.savedFlex;d.to.height=f.ownerCt.layout.calculateChildBox(f).height;delete f.flex}else{d.to.height=f.height}}if(h==Ext.Component.DIRECTION_TOP){g=f.getPosition()[1]-Ext.fly(f.el.dom.offsetParent).getRegion().top;d.from.top=g;d.to.top=g-(d.to.height-j)}}else{if((h==Ext.Component.DIRECTION_LEFT)||(h==Ext.Component.DIRECTION_RIGHT)){f.collapseMemento.restore(&quot;width&quot;,false);if(f.width===undefined){f.setCalculatedSize(null,f.height);d.to.width=f.getWidth();f.setCalculatedSize(d.from.width,f.height)}else{if(f.savedFlex){f.flex=f.savedFlex;d.to.width=f.ownerCt.layout.calculateChildBox(f).width;delete f.flex}else{d.to.width=f.width}}if(h==Ext.Component.DIRECTION_LEFT){g=f.getPosition()[0]-Ext.fly(f.el.dom.offsetParent).getRegion().left;d.from.left=g;d.to.left=g-(d.to.width-a)}}}if(b){f.animate(d)}else{f.setCalculatedSize(d.to.width,d.to.height);if(d.to.x){f.setLeft(d.to.x)}if(d.to.y){f.setTop(d.to.y)}f.afterExpand(false)}return f},afterExpand:function(b){var a=this;if(a.savedFlex){a.flex=a.savedFlex;delete a.savedFlex;delete a.width;delete a.height}if(a.collapseMemento){a.collapseMemento.restoreAll()}if(b&amp;&amp;a.ownerCt){Ext.defer(a.ownerCt.doLayout,Ext.isIE6?1:0,a)}if(a.resizer){a.resizer.enable()}a.fireEvent(&quot;expand&quot;,a);if(b&amp;&amp;a.collapseTool){a.collapseTool.enable()}},toggleCollapse:function(){if(this.collapsed){this.expand(this.animCollapse)}else{this.collapse(this.collapseDirection,this.animCollapse)}return this},getKeyMap:function(){if(!this.keyMap){this.keyMap=Ext.create(&quot;Ext.util.KeyMap&quot;,this.el,this.keys)}return this.keyMap},initDraggable:function(){this.dd=Ext.create(&quot;Ext.panel.DD&quot;,this,Ext.isBoolean(this.draggable)?null:this.draggable)},ghostTools:function(){var b=[],a=this.header.query(&quot;tool[hidden=false]&quot;);if(a.length){Ext.each(a,function(c){b.push({type:c.type})})}else{b=[{type:&quot;placeholder&quot;}]}return b},ghost:function(a){var d=this,b=d.ghostPanel,c=d.getBox(),e;if(!b){b=Ext.create(&quot;Ext.panel.Panel&quot;,{renderTo:d.floating?d.el.dom.parentNode:document.body,floating:{shadow:false},frame:Ext.supports.CSS3BorderRadius?d.frame:false,overlapHeader:d.overlapHeader,headerPosition:d.headerPosition,baseCls:d.baseCls,cls:d.baseCls+&quot;-ghost &quot;+(a||&quot;&quot;)});d.ghostPanel=b}b.floatParent=d.floatParent;if(d.floating){b.setZIndex(Ext.Number.from(d.el.getStyle(&quot;zIndex&quot;),0))}else{b.toFront()}e=b.header;if(e){e.suspendLayout=true;Ext.Array.forEach(e.query(&quot;tool&quot;),function(f){e.remove(f)});e.suspendLayout=false}b.addTool(d.ghostTools());b.setTitle(d.title);b.setIconCls(d.iconCls);b.el.show();b.setPosition(c.x,c.y);b.setSize(c.width,c.height);d.el.hide();if(d.floatingItems){d.floatingItems.hide()}return b},unghost:function(b,a){var c=this;if(!c.ghostPanel){return}if(b!==false){c.el.show();if(a!==false){c.setPosition(c.ghostPanel.getPosition())}if(c.floatingItems){c.floatingItems.show()}Ext.defer(c.focus,10,c)}c.ghostPanel.el.hide()},initResizable:function(a){if(this.collapsed){a.disabled=true}this.callParent([a])}},function(){this.prototype.animCollapse=Ext.enableFx});Ext.define(&quot;Ext.tip.Tip&quot;,{extend:&quot;Ext.panel.Panel&quot;,requires:[&quot;Ext.layout.component.Tip&quot;],alternateClassName:&quot;Ext.Tip&quot;,minWidth:40,maxWidth:300,shadow:&quot;sides&quot;,defaultAlign:&quot;tl-bl?&quot;,constrainPosition:true,frame:false,autoRender:true,hidden:true,baseCls:Ext.baseCSSPrefix+&quot;tip&quot;,floating:{shadow:true,shim:true,constrain:true},focusOnToFront:false,componentLayout:&quot;tip&quot;,closeAction:&quot;hide&quot;,ariaRole:&quot;tooltip&quot;,initComponent:function(){var a=this;a.floating=Ext.apply({},{shadow:a.shadow},a.self.prototype.floating);a.callParent(arguments);a.constrain=a.constrain||a.constrainPosition},showAt:function(b){var a=this;this.callParent(arguments);if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}},showBy:function(a,b){this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){var a=this;a.draggable={el:a.getDragEl(),delegate:a.header.el,constrain:a,constrainTo:a.el.getScopeParent()};Ext.Component.prototype.initDraggable.call(a)},ghost:undefined,unghost:undefined});Ext.define(&quot;Ext.tip.ToolTip&quot;,{extend:&quot;Ext.tip.Tip&quot;,alias:&quot;widget.tooltip&quot;,alternateClassName:&quot;Ext.ToolTip&quot;,showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,quickShowInterval:250,initComponent:function(){var a=this;a.callParent(arguments);a.lastActive=new Date();a.setTarget(a.target);a.origAnchor=a.anchor},onRender:function(b,a){var c=this;c.callParent(arguments);c.anchorCls=Ext.baseCSSPrefix+&quot;tip-anchor-&quot;+c.getAnchorPosition();c.anchorEl=c.el.createChild({cls:Ext.baseCSSPrefix+&quot;tip-anchor &quot;+c.anchorCls})},afterRender:function(){var a=this,b;a.callParent(arguments);b=parseInt(a.el.getZIndex(),10)||0;a.anchorEl.setStyle(&quot;z-index&quot;,b+1).setVisibilityMode(Ext.Element.DISPLAY)},setTarget:function(d){var b=this,a=Ext.get(d),c;if(b.target){c=Ext.get(b.target);b.mun(c,&quot;mouseover&quot;,b.onTargetOver,b);b.mun(c,&quot;mouseout&quot;,b.onTargetOut,b);b.mun(c,&quot;mousemove&quot;,b.onMouseMove,b)}b.target=a;if(a){b.mon(a,{freezeEvent:true,mouseover:b.onTargetOver,mouseout:b.onTargetOut,mousemove:b.onMouseMove,scope:b})}if(b.anchor){b.anchorTarget=b.target}},onMouseMove:function(d){var b=this,a=b.delegate?d.getTarget(b.delegate):b.triggerElement=true,c;if(a){b.targetXY=d.getXY();if(a===b.triggerElement){if(!b.hidden&amp;&amp;b.trackMouse){c=b.getTargetXY();if(b.constrainPosition){c=b.el.adjustForConstraints(c,b.el.getScopeParent())}b.setPagePosition(c)}}else{b.hide();b.lastActive=new Date(0);b.onTargetOver(d)}}else{if((!b.closable&amp;&amp;b.isVisible())&amp;&amp;b.autoHide!==false){b.hide()}}},getTargetXY:function(){var i=this,d;if(i.delegate){i.anchorTarget=i.triggerElement}if(i.anchor){i.targetCounter++;var c=i.getOffsets(),m=(i.anchorToTarget&amp;&amp;!i.trackMouse)?i.el.getAlignToXY(i.anchorTarget,i.getAnchorAlign()):i.targetXY,a=Ext.Element.getViewWidth()-5,h=Ext.Element.getViewHeight()-5,k=document.documentElement,e=document.body,l=(k.scrollLeft||e.scrollLeft||0)+5,j=(k.scrollTop||e.scrollTop||0)+5,b=[m[0]+c[0],m[1]+c[1]],g=i.getSize(),f=i.constrainPosition;i.anchorEl.removeCls(i.anchorCls);if(i.targetCounter&lt;2&amp;&amp;f){if(b[0]&lt;l){if(i.anchorToTarget){i.defaultAlign=&quot;l-r&quot;;if(i.mouseOffset){i.mouseOffset[0]*=-1}}i.anchor=&quot;left&quot;;return i.getTargetXY()}if(b[0]+g.width&gt;a){if(i.anchorToTarget){i.defaultAlign=&quot;r-l&quot;;if(i.mouseOffset){i.mouseOffset[0]*=-1}}i.anchor=&quot;right&quot;;return i.getTargetXY()}if(b[1]&lt;j){if(i.anchorToTarget){i.defaultAlign=&quot;t-b&quot;;if(i.mouseOffset){i.mouseOffset[1]*=-1}}i.anchor=&quot;top&quot;;return i.getTargetXY()}if(b[1]+g.height&gt;h){if(i.anchorToTarget){i.defaultAlign=&quot;b-t&quot;;if(i.mouseOffset){i.mouseOffset[1]*=-1}}i.anchor=&quot;bottom&quot;;return i.getTargetXY()}}i.anchorCls=Ext.baseCSSPrefix+&quot;tip-anchor-&quot;+i.getAnchorPosition();i.anchorEl.addCls(i.anchorCls);i.targetCounter=0;return b}else{d=i.getMouseOffset();return(i.targetXY)?[i.targetXY[0]+d[0],i.targetXY[1]+d[1]]:d}},getMouseOffset:function(){var a=this,b=a.anchor?[0,0]:[15,18];if(a.mouseOffset){b[0]+=a.mouseOffset[0];b[1]+=a.mouseOffset[1]}return b},getAnchorPosition:function(){var b=this,a;if(b.anchor){b.tipAnchor=b.anchor.charAt(0)}else{a=b.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);b.tipAnchor=a[1].charAt(0)}switch(b.tipAnchor){case&quot;t&quot;:return&quot;top&quot;;case&quot;b&quot;:return&quot;bottom&quot;;case&quot;r&quot;:return&quot;right&quot;}return&quot;left&quot;},getAnchorAlign:function(){switch(this.anchor){case&quot;top&quot;:return&quot;tl-bl&quot;;case&quot;left&quot;:return&quot;tl-tr&quot;;case&quot;right&quot;:return&quot;tr-tl&quot;;default:return&quot;bl-tl&quot;}},getOffsets:function(){var c=this,d,b,a=c.getAnchorPosition().charAt(0);if(c.anchorToTarget&amp;&amp;!c.trackMouse){switch(a){case&quot;t&quot;:b=[0,9];break;case&quot;b&quot;:b=[0,-13];break;case&quot;r&quot;:b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case&quot;t&quot;:b=[-15-c.anchorOffset,30];break;case&quot;b&quot;:b=[-19-c.anchorOffset,-13-c.el.dom.offsetHeight];break;case&quot;r&quot;:b=[-15-c.el.dom.offsetWidth,-13-c.anchorOffset];break;default:b=[25,-13-c.anchorOffset];break}}d=c.getMouseOffset();b[0]+=d[0];b[1]+=d[1];return b},onTargetOver:function(c){var b=this,a;if(b.disabled||c.within(b.target.dom,true)){return}a=c.getTarget(b.delegate);if(a){b.triggerElement=a;b.clearTimer(&quot;hide&quot;);b.targetXY=c.getXY();b.delayShow()}},delayShow:function(){var a=this;if(a.hidden&amp;&amp;!a.showTimer){if(Ext.Date.getElapsed(a.lastActive)&lt;a.quickShowInterval){a.show()}else{a.showTimer=Ext.defer(a.show,a.showDelay,a)}}else{if(!a.hidden&amp;&amp;a.autoHide!==false){a.show()}}},onTargetOut:function(b){var a=this;if(a.disabled||b.within(a.target.dom,true)){return}a.clearTimer(&quot;show&quot;);if(a.autoHide!==false){a.delayHide()}},delayHide:function(){var a=this;if(!a.hidden&amp;&amp;!a.hideTimer){a.hideTimer=Ext.defer(a.hide,a.hideDelay,a)}},hide:function(){var a=this;a.clearTimer(&quot;dismiss&quot;);a.lastActive=new Date();if(a.anchorEl){a.anchorEl.hide()}a.callParent(arguments);delete a.triggerElement},show:function(){var a=this;this.callParent();if(this.hidden===false){a.setPagePosition(-10000,-10000);if(a.anchor){a.anchor=a.origAnchor}a.showAt(a.getTargetXY());if(a.anchor){a.syncAnchor();a.anchorEl.show()}else{a.anchorEl.hide()}}},showAt:function(b){var a=this;a.lastActive=new Date();a.clearTimers();if(!a.isVisible()){this.callParent(arguments)}if(a.isVisible()){a.setPagePosition(b[0],b[1]);if(a.constrainPosition||a.constrain){a.doConstrain()}a.toFront(true)}if(a.dismissDelay&amp;&amp;a.autoHide!==false){a.dismissTimer=Ext.defer(a.hide,a.dismissDelay,a)}if(a.anchor){a.syncAnchor();if(!a.anchorEl.isVisible()){a.anchorEl.show()}}else{a.anchorEl.hide()}},syncAnchor:function(){var c=this,a,b,d;switch(c.tipAnchor.charAt(0)){case&quot;t&quot;:a=&quot;b&quot;;b=&quot;tl&quot;;d=[20+c.anchorOffset,1];break;case&quot;r&quot;:a=&quot;l&quot;;b=&quot;tr&quot;;d=[-1,12+c.anchorOffset];break;case&quot;b&quot;:a=&quot;t&quot;;b=&quot;bl&quot;;d=[20+c.anchorOffset,-1];break;default:a=&quot;r&quot;;b=&quot;tl&quot;;d=[1,12+c.anchorOffset];break}c.anchorEl.alignTo(c.el,a+&quot;-&quot;+b,d)},setPagePosition:function(a,c){var b=this;b.callParent(arguments);if(b.anchor){b.syncAnchor()}},clearTimer:function(a){a=a+&quot;Timer&quot;;clearTimeout(this[a]);delete this[a]},clearTimers:function(){var a=this;a.clearTimer(&quot;show&quot;);a.clearTimer(&quot;dismiss&quot;);a.clearTimer(&quot;hide&quot;)},onShow:function(){var a=this;a.callParent();a.mon(Ext.getDoc(),&quot;mousedown&quot;,a.onDocMouseDown,a)},onHide:function(){var a=this;a.callParent();a.mun(Ext.getDoc(),&quot;mousedown&quot;,a.onDocMouseDown,a)},onDocMouseDown:function(b){var a=this;if(a.autoHide!==true&amp;&amp;!a.closable&amp;&amp;!b.within(a.el.dom)){a.disable();Ext.defer(a.doEnable,100,a)}},doEnable:function(){if(!this.isDestroyed){this.enable()}},onDisable:function(){this.callParent();this.clearTimers();this.hide()},beforeDestroy:function(){var a=this;a.clearTimers();Ext.destroy(a.anchorEl);delete a.anchorEl;delete a.target;delete a.anchorTarget;delete a.triggerElement;a.callParent()},onDestroy:function(){Ext.getDoc().un(&quot;mousedown&quot;,this.onDocMouseDown,this);this.callParent()}});Ext.define(&quot;Ext.tip.QuickTip&quot;,{extend:&quot;Ext.tip.ToolTip&quot;,alternateClassName:&quot;Ext.QuickTip&quot;,interceptTitles:false,title:&quot;&amp;#160;&quot;,tagConfig:{namespace:&quot;data-&quot;,attribute:&quot;qtip&quot;,width:&quot;qwidth&quot;,target:&quot;target&quot;,title:&quot;qtitle&quot;,hide:&quot;hide&quot;,cls:&quot;qclass&quot;,align:&quot;qalign&quot;,anchor:&quot;anchor&quot;},initComponent:function(){var a=this;a.target=a.target||Ext.getDoc();a.targets=a.targets||{};a.callParent()},register:function(c){var g=Ext.isArray(c)?c:arguments,d=0,a=g.length,f,b,e;for(;d&lt;a;d++){c=g[d];f=c.target;if(f){if(Ext.isArray(f)){for(b=0,e=f.length;b&lt;e;b++){this.targets[Ext.id(f[b])]=c}}else{this.targets[Ext.id(f)]=c}}}},unregister:function(a){delete this.targets[Ext.id(a)]},cancelShow:function(a){var b=this,c=b.activeTarget;a=Ext.get(a).dom;if(b.isVisible()){if(c&amp;&amp;c.el==a){b.hide()}}else{if(c&amp;&amp;c.el==a){b.clearTimer(&quot;show&quot;)}}},getTipCfg:function(d){var c=d.getTarget(),b=c.title,a;if(this.interceptTitles&amp;&amp;b&amp;&amp;Ext.isString(b)){c.qtip=b;c.removeAttribute(&quot;title&quot;);d.preventDefault();return{text:b}}else{a=this.tagConfig;c=d.getTarget(&quot;[&quot;+a.namespace+a.attribute+&quot;]&quot;);if(c){return{target:c,text:c.getAttribute(a.namespace+a.attribute)}}}},onTargetOver:function(h){var f=this,g=h.getTarget(),i,c,d,b,a;if(f.disabled){return}f.targetXY=h.getXY();if(!g||g.nodeType!==1||g==document||g==document.body){return}if(f.activeTarget&amp;&amp;((g==f.activeTarget.el)||Ext.fly(f.activeTarget.el).contains(g))){f.clearTimer(&quot;hide&quot;);f.show();return}if(g){Ext.Object.each(f.targets,function(e,j){var k=Ext.fly(j.target);if(k&amp;&amp;(k.dom===g||k.contains(g))){i=k.dom;return false}});if(i){f.activeTarget=f.targets[i.id];f.activeTarget.el=g;f.anchor=f.activeTarget.anchor;if(f.anchor){f.anchorTarget=g}f.delayShow();return}}i=Ext.get(g);c=f.tagConfig;d=c.namespace;b=f.getTipCfg(h);if(b){if(b.target){g=b.target;i=Ext.get(g)}a=i.getAttribute(d+c.hide);f.activeTarget={el:g,text:b.text,width:+i.getAttribute(d+c.width)||null,autoHide:a!=&quot;user&quot;&amp;&amp;a!==&quot;false&quot;,title:i.getAttribute(d+c.title),cls:i.getAttribute(d+c.cls),align:i.getAttribute(d+c.align)};f.anchor=i.getAttribute(d+c.anchor);if(f.anchor){f.anchorTarget=g}f.delayShow()}},onTargetOut:function(b){var a=this;if(a.activeTarget&amp;&amp;b.within(a.activeTarget.el)&amp;&amp;!a.getTipCfg(b)){return}a.clearTimer(&quot;show&quot;);if(a.autoHide!==false){a.delayHide()}},showAt:function(c){var a=this,b=a.activeTarget;if(b){if(!a.rendered){a.render(Ext.getBody());a.activeTarget=b}if(b.title){a.setTitle(b.title||&quot;&quot;);a.header.show()}else{a.header.hide()}a.body.update(b.text);a.autoHide=b.autoHide;a.dismissDelay=b.dismissDelay||a.dismissDelay;if(a.lastCls){a.el.removeCls(a.lastCls);delete a.lastCls}if(b.cls){a.el.addCls(b.cls);a.lastCls=b.cls}a.setWidth(b.width);if(a.anchor){a.constrainPosition=false}else{if(b.align){c=a.el.getAlignToXY(b.el,b.align);a.constrainPosition=false}else{a.constrainPosition=true}}}a.callParent([c])},hide:function(){delete this.activeTarget;this.callParent()}});Ext.define(&quot;Ext.tip.QuickTipManager&quot;,function(){var b,a=false;return{requires:[&quot;Ext.tip.QuickTip&quot;],singleton:true,alternateClassName:&quot;Ext.QuickTips&quot;,init:function(f,d){if(!b){if(!Ext.isReady){Ext.onReady(function(){Ext.tip.QuickTipManager.init(f)});return}var c=Ext.apply({disabled:a},d),e=c.className,g=c.xtype;if(e){delete c.className}else{if(g){e=&quot;widget.&quot;+g;delete c.xtype}}if(f!==false){c.renderTo=document.body}b=Ext.create(e||&quot;Ext.tip.QuickTip&quot;,c)}},destroy:function(){if(b){var c;b.destroy();b=c}},ddDisable:function(){if(b&amp;&amp;!a){b.disable()}},ddEnable:function(){if(b&amp;&amp;!a){b.enable()}},enable:function(){if(b){b.enable()}a=false},disable:function(){if(b){b.disable()}a=true},isEnabled:function(){return b!==undefined&amp;&amp;!b.disabled},getQuickTip:function(){return b},register:function(){b.register.apply(b,arguments)},unregister:function(){b.unregister.apply(b,arguments)},tips:function(){b.register.apply(b,arguments)}}}());Ext.define(&quot;Ext.app.Application&quot;,{extend:&quot;Ext.app.Controller&quot;,requires:[&quot;Ext.ModelManager&quot;,&quot;Ext.data.Model&quot;,&quot;Ext.data.StoreManager&quot;,&quot;Ext.tip.QuickTipManager&quot;,&quot;Ext.ComponentManager&quot;,&quot;Ext.app.EventBus&quot;],scope:undefined,enableQuickTips:true,appFolder:&quot;app&quot;,autoCreateViewport:false,constructor:function(b){b=b||{};Ext.apply(this,b);var d=b.requires||[];Ext.Loader.setPath(this.name,this.appFolder);if(this.paths){Ext.Object.each(this.paths,function(g,h){Ext.Loader.setPath(g,h)})}this.callParent(arguments);this.eventbus=Ext.create(&quot;Ext.app.EventBus&quot;);var f=Ext.Array.from(this.controllers),e=f&amp;&amp;f.length,c,a;this.controllers=Ext.create(&quot;Ext.util.MixedCollection&quot;);if(this.autoCreateViewport){d.push(this.getModuleClassName(&quot;Viewport&quot;,&quot;view&quot;))}for(c=0;c&lt;e;c++){d.push(this.getModuleClassName(f[c],&quot;controller&quot;))}Ext.require(d);Ext.onReady(function(){for(c=0;c&lt;e;c++){a=this.getController(f[c]);a.init(this)}this.onBeforeLaunch.call(this)},this)},control:function(b,c,a){this.eventbus.control(b,c,a)},launch:Ext.emptyFn,onBeforeLaunch:function(){if(this.enableQuickTips){Ext.tip.QuickTipManager.init()}if(this.autoCreateViewport){this.getView(&quot;Viewport&quot;).create()}this.launch.call(this.scope||this);this.launched=true;this.fireEvent(&quot;launch&quot;,this);this.controllers.each(function(a){a.onLaunch(this)},this)},getModuleClassName:function(a,c){var b=Ext.Loader.getPrefix(a);if(b.length&gt;0&amp;&amp;b!==a){return a}return this.name+&quot;.&quot;+c+&quot;.&quot;+a},getController:function(b){var a=this.controllers.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,&quot;controller&quot;),{application:this,id:b});this.controllers.add(a)}return a},getStore:function(b){var a=Ext.StoreManager.get(b);if(!a){a=Ext.create(this.getModuleClassName(b,&quot;store&quot;),{storeId:b})}return a},getModel:function(a){a=this.getModuleClassName(a,&quot;model&quot;);return Ext.ModelManager.getModel(a)},getView:function(a){a=this.getModuleClassName(a,&quot;view&quot;);return Ext.ClassManager.get(a)}});Ext.define(&quot;Ext.util.Point&quot;,{extend:&quot;Ext.util.Region&quot;,statics:{fromEvent:function(a){a=(a.changedTouches&amp;&amp;a.changedTouches.length&gt;0)?a.changedTouches[0]:a;return new this(a.pageX,a.pageY)}},constructor:function(a,b){this.callParent([b,a,b,a])},toString:function(){return&quot;Point[&quot;+this.x+&quot;,&quot;+this.y+&quot;]&quot;},equals:function(a){return(this.x==a.x&amp;&amp;this.y==a.y)},isWithin:function(b,a){if(!Ext.isObject(a)){a={x:a,y:a}}return(this.x&lt;=b.x+a.x&amp;&amp;this.x&gt;=b.x-a.x&amp;&amp;this.y&lt;=b.y+a.y&amp;&amp;this.y&gt;=b.y-a.y)},roundedEquals:function(a){return(Math.round(this.x)==Math.round(a.x)&amp;&amp;Math.round(this.y)==Math.round(a.y))}},function(){this.prototype.translate=Ext.util.Region.prototype.translateBy});Ext.define(&quot;Ext.Layer&quot;,{uses:[&quot;Ext.Shadow&quot;],statics:{shims:[]},extend:&quot;Ext.Element&quot;,constructor:function(b,a){b=b||{};var c=this,d=Ext.DomHelper,f=b.parentEl,e=f?Ext.getDom(f):document.body,g=b.hideMode;if(a){c.dom=Ext.getDom(a)}if(!c.dom){c.dom=d.append(e,b.dh||{tag:&quot;div&quot;,cls:Ext.baseCSSPrefix+&quot;layer&quot;})}else{c.addCls(Ext.baseCSSPrefix+&quot;layer&quot;);if(!c.dom.parentNode){e.appendChild(c.dom)}}if(b.cls){c.addCls(b.cls)}c.constrain=b.constrain!==false;if(g){c.setVisibilityMode(Ext.Element[g.toUpperCase()]);if(c.visibilityMode==Ext.Element.ASCLASS){c.visibilityCls=b.visibilityCls}}else{if(b.useDisplay){c.setVisibilityMode(Ext.Element.DISPLAY)}else{c.setVisibilityMode(Ext.Element.VISIBILITY)}}if(b.id){c.id=c.dom.id=b.id}else{c.id=Ext.id(c.dom)}c.position(&quot;absolute&quot;);if(b.shadow){c.shadowOffset=b.shadowOffset||4;c.shadow=Ext.create(&quot;Ext.Shadow&quot;,{offset:c.shadowOffset,mode:b.shadow});c.disableShadow()}else{c.shadowOffset=0}c.useShim=b.shim!==false&amp;&amp;Ext.useShims;if(b.hidden===true){c.hide()}else{c.show()}},getZIndex:function(){return parseInt((this.getShim()||this).getStyle(&quot;z-index&quot;),10)},getShim:function(){var b=this,c,a;if(!b.useShim){return null}if(!b.shim){c=b.self.shims.shift();if(!c){c=b.createShim();c.enableDisplayMode(&quot;block&quot;);c.hide()}a=b.dom.parentNode;if(c.dom.parentNode!=a){a.insertBefore(c.dom,b.dom)}b.shim=c}return b.shim},hideShim:function(){var a=this;if(a.shim){a.shim.setDisplayed(false);a.self.shims.push(a.shim);delete a.shim}},disableShadow:function(){var a=this;if(a.shadow&amp;&amp;!a.shadowDisabled){a.shadowDisabled=true;a.shadow.hide();a.lastShadowOffset=a.shadowOffset;a.shadowOffset=0}},enableShadow:function(a){var b=this;if(b.shadow&amp;&amp;b.shadowDisabled){b.shadowDisabled=false;b.shadowOffset=b.lastShadowOffset;delete b.lastShadowOffset;if(a){b.sync(true)}}},sync:function(b){var i=this,m=i.shadow,g,e,a;if(!i.updating&amp;&amp;i.isVisible()&amp;&amp;(m||i.useShim)){var d=i.getShim(),c=i.getLeft(true),n=i.getTop(true),k=i.dom.offsetWidth,f=i.dom.offsetHeight,j;if(m&amp;&amp;!i.shadowDisabled){if(b&amp;&amp;!m.isVisible()){m.show(i)}else{m.realign(c,n,k,f)}if(d){j=d.getStyle(&quot;z-index&quot;);if(j&gt;i.zindex){i.shim.setStyle(&quot;z-index&quot;,i.zindex-2)}d.show();if(m.isVisible()){g=m.el.getXY();e=d.dom.style;a=m.el.getSize();if(Ext.supports.CSS3BoxShadow){a.height+=6;a.width+=4;g[0]-=2;g[1]-=4}e.left=(g[0])+&quot;px&quot;;e.top=(g[1])+&quot;px&quot;;e.width=(a.width)+&quot;px&quot;;e.height=(a.height)+&quot;px&quot;}else{d.setSize(k,f);d.setLeftTop(c,n)}}}else{if(d){j=d.getStyle(&quot;z-index&quot;);if(j&gt;i.zindex){i.shim.setStyle(&quot;z-index&quot;,i.zindex-2)}d.show();d.setSize(k,f);d.setLeftTop(c,n)}}}return i},remove:function(){this.hideUnders();this.callParent()},beginUpdate:function(){this.updating=true},endUpdate:function(){this.updating=false;this.sync(true)},hideUnders:function(){if(this.shadow){this.shadow.hide()}this.hideShim()},constrainXY:function(){if(this.constrain){var f=Ext.Element.getViewWidth(),b=Ext.Element.getViewHeight(),k=Ext.getDoc().getScroll(),j=this.getXY(),g=j[0],e=j[1],a=this.shadowOffset,i=this.dom.offsetWidth+a,c=this.dom.offsetHeight+a,d=false;if((g+i)&gt;f+k.left){g=f-i-a;d=true}if((e+c)&gt;b+k.top){e=b-c-a;d=true}if(g&lt;k.left){g=k.left;d=true}if(e&lt;k.top){e=k.top;d=true}if(d){Ext.Layer.superclass.setXY.call(this,[g,e]);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},setVisible:function(e,b,d,g,f){var c=this,a;a=function(){if(e){c.sync(true)}if(g){g()}};if(!e){c.hideUnders(true)}c.callParent([e,b,d,g,f]);if(!b){a()}return c},beforeFx:function(){this.beforeAction();return this.callParent(arguments)},afterFx:function(){this.callParent(arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&amp;&amp;this.shadow){this.shadow.hide()}},setLeft:function(a){this.callParent(arguments);return this.sync()},setTop:function(a){this.callParent(arguments);return this.sync()},setLeftTop:function(b,a){this.callParent(arguments);return this.sync()},setXY:function(d,a,c,f,e){var b=this;f=b.createCB(f);b.fixDisplay();b.beforeAction();b.callParent([d,a,c,f,e]);if(!a){f()}return b},createCB:function(c){var a=this,b=a.shadow&amp;&amp;a.shadow.isVisible();return function(){a.constrainXY();a.sync(b);if(c){c()}}},setX:function(a,b,c,e,d){this.setXY([a,this.getY()],b,c,e,d);return this},setY:function(e,a,b,d,c){this.setXY([this.getX(),e],a,b,d,c);return this},setSize:function(a,c,b,e,g,f){var d=this;g=d.createCB(g);d.beforeAction();d.callParent([a,c,b,e,g,f]);if(!b){g()}return d},setWidth:function(a,b,d,f,e){var c=this;f=c.createCB(f);c.beforeAction();c.callParent([a,b,d,f,e]);if(!b){f()}return c},setHeight:function(b,a,d,f,e){var c=this;f=c.createCB(f);c.beforeAction();c.callParent([b,a,d,f,e]);if(!a){f()}return c},setBounds:function(g,f,a,i,b,c,h,d){var e=this;h=e.createCB(h);e.beforeAction();if(!b){Ext.Layer.superclass.setXY.call(e,[g,f]);Ext.Layer.superclass.setSize.call(e,a,i);h()}else{e.callParent([g,f,a,i,b,c,h,d])}return e},setZIndex:function(a){var b=this;b.zindex=a;if(b.getShim()){b.shim.setStyle(&quot;z-index&quot;,a++)}if(b.shadow){b.shadow.setZIndex(a++)}return b.setStyle(&quot;z-index&quot;,a)},setOpacity:function(a){if(this.shadow){this.shadow.setOpacity(a)}return this.callParent(arguments)}});Ext.define(&quot;Ext.data.Batch&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},autoStart:false,current:-1,total:0,isRunning:false,isComplete:false,hasException:false,pauseOnException:true,constructor:function(a){var b=this;b.addEvents(&quot;complete&quot;,&quot;exception&quot;,&quot;operationcomplete&quot;);b.mixins.observable.constructor.call(b,a);b.operations=[]},add:function(a){this.total++;a.setBatch(this);this.operations.push(a)},start:function(){this.hasException=false;this.isRunning=true;this.runNextOperation()},runNextOperation:function(){this.runOperation(this.current+1)},pause:function(){this.isRunning=false},runOperation:function(d){var e=this,c=e.operations,b=c[d],a;if(b===undefined){e.isRunning=false;e.isComplete=true;e.fireEvent(&quot;complete&quot;,e,c[c.length-1])}else{e.current=d;a=function(f){var g=f.hasException();if(g){e.hasException=true;e.fireEvent(&quot;exception&quot;,e,f)}else{e.fireEvent(&quot;operationcomplete&quot;,e,f)}if(g&amp;&amp;e.pauseOnException){e.pause()}else{f.setCompleted();e.runNextOperation()}};b.setStarted();e.proxy[b.action](b,a,e)}}});Ext.define(&quot;Ext.data.Request&quot;,{action:undefined,params:undefined,method:&quot;GET&quot;,url:undefined,constructor:function(a){Ext.apply(this,a)}});Ext.define(&quot;Ext.PluginManager&quot;,{extend:&quot;Ext.AbstractManager&quot;,alternateClassName:&quot;Ext.PluginMgr&quot;,singleton:true,typeName:&quot;ptype&quot;,create:function(a,b){if(a.init){return a}else{return Ext.createByAlias(&quot;plugin.&quot;+(a.ptype||b),a)}},findByType:function(c,f){var e=[],b=this.types;for(var a in b){if(!b.hasOwnProperty(a)){continue}var d=b[a];if(d.type==c&amp;&amp;(!f||(f===true&amp;&amp;d.isDefault))){e.push(d)}}return e}},function(){Ext.preg=function(){return Ext.PluginManager.registerType.apply(Ext.PluginManager,arguments)}});Ext.define(&quot;Ext.layout.component.Auto&quot;,{alias:&quot;layout.autocomponent&quot;,extend:&quot;Ext.layout.component.Component&quot;,type:&quot;autocomponent&quot;,onLayout:function(b,a){this.setTargetSize(b,a)}});Ext.define(&quot;Ext.LoadMask&quot;,{extend:&quot;Ext.Component&quot;,alias:&quot;widget.loadmask&quot;,mixins:{floating:&quot;Ext.util.Floating&quot;},uses:[&quot;Ext.data.StoreManager&quot;],msg:&quot;Loading...&quot;,msgCls:Ext.baseCSSPrefix+&quot;mask-loading&quot;,useMsg:true,disabled:false,baseCls:Ext.baseCSSPrefix+&quot;mask-msg&quot;,renderTpl:'&lt;div style=&quot;position:relative&quot; class=&quot;{msgCls}&quot;&gt;&lt;/div&gt;',modal:true,floating:{shadow:&quot;frame&quot;},focusOnToFront:false,constructor:function(b,a){var c=this;if(b.isComponent){c.ownerCt=b;c.bindComponent(b)}else{c.ownerCt=new Ext.Component({el:Ext.get(b),rendered:true,componentLayoutCounter:1});c.container=b}c.callParent([a]);if(c.store){c.bindStore(c.store,true)}c.renderData={msgCls:c.msgCls};c.renderSelectors={msgEl:&quot;div&quot;}},bindComponent:function(a){this.mon(a,{resize:this.onComponentResize,scope:this})},afterRender:function(){this.callParent(arguments);this.container=this.floatParent.getContentTarget()},onComponentResize:function(){var a=this;if(a.rendered&amp;&amp;a.isVisible()){a.toFront();a.center()}},bindStore:function(a,b){var c=this;if(!b&amp;&amp;c.store){c.mun(c.store,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad});if(!a){c.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);c.mon(a,{scope:c,beforeload:c.onBeforeLoad,load:c.onLoad,exception:c.onLoad})}c.store=a;if(a&amp;&amp;a.isLoading()){c.onBeforeLoad()}},onDisable:function(){this.callParent(arguments);if(this.loading){this.onLoad()}},onBeforeLoad:function(){var c=this,a=c.ownerCt||c.floatParent,b;if(!this.disabled){if(a.componentLayoutCounter){Ext.Component.prototype.show.call(c)}else{b=a.afterComponentLayout;a.afterComponentLayout=function(){a.afterComponentLayout=b;b.apply(a,arguments);if(c.loading){Ext.Component.prototype.show.call(c)}}}}},onHide:function(){var a=this;a.callParent(arguments);a.showOnParentShow=true},onShow:function(){var b=this,a=b.msgEl;b.callParent(arguments);b.loading=true;if(b.useMsg){a.show().update(b.msg)}else{a.parent().hide()}},afterShow:function(){this.callParent(arguments);this.center()},onLoad:function(){this.loading=false;Ext.Component.prototype.hide.call(this)}});Ext.define(&quot;Ext.resizer.Resizer&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},uses:[&quot;Ext.resizer.ResizeTracker&quot;,&quot;Ext.Component&quot;],alternateClassName:&quot;Ext.Resizable&quot;,handleCls:Ext.baseCSSPrefix+&quot;resizable-handle&quot;,pinnedCls:Ext.baseCSSPrefix+&quot;resizable-pinned&quot;,overCls:Ext.baseCSSPrefix+&quot;resizable-over&quot;,wrapCls:Ext.baseCSSPrefix+&quot;resizable-wrap&quot;,dynamic:true,handles:&quot;s e se&quot;,height:null,width:null,heightIncrement:0,widthIncrement:0,minHeight:20,minWidth:20,maxHeight:10000,maxWidth:10000,pinned:false,preserveRatio:false,transparent:false,possiblePositions:{n:&quot;north&quot;,s:&quot;south&quot;,e:&quot;east&quot;,w:&quot;west&quot;,se:&quot;southeast&quot;,sw:&quot;southwest&quot;,nw:&quot;northwest&quot;,ne:&quot;northeast&quot;},constructor:function(a){var g=this,f,l,k=g.handles,b,j,e,c=0,h;this.addEvents(&quot;beforeresize&quot;,&quot;resizedrag&quot;,&quot;resize&quot;);if(Ext.isString(a)||Ext.isElement(a)||a.dom){f=a;a=arguments[1]||{};a.target=f}g.mixins.observable.constructor.call(g,a);f=g.target;if(f){if(f.isComponent){g.el=f.getEl();if(f.minWidth){g.minWidth=f.minWidth}if(f.minHeight){g.minHeight=f.minHeight}if(f.maxWidth){g.maxWidth=f.maxWidth}if(f.maxHeight){g.maxHeight=f.maxHeight}if(f.floating){if(!this.hasOwnProperty(&quot;handles&quot;)){this.handles=&quot;n ne e se s sw w nw&quot;}}}else{g.el=g.target=Ext.get(f)}}else{g.target=g.el=Ext.get(g.el)}l=g.el.dom.tagName;if(l==&quot;TEXTAREA&quot;||l==&quot;IMG&quot;){g.originalTarget=g.target;g.target=g.el=g.el.wrap({cls:g.wrapCls,id:g.el.id+&quot;-rzwrap&quot;});g.el.setPositioning(g.originalTarget.getPositioning());g.originalTarget.clearPositioning();var d=g.originalTarget.getBox();g.el.setBox(d)}g.el.position();if(g.pinned){g.el.addCls(g.pinnedCls)}g.resizeTracker=Ext.create(&quot;Ext.resizer.ResizeTracker&quot;,{disabled:g.disabled,target:g.target,constrainTo:g.constrainTo,overCls:g.overCls,throttle:g.throttle,originalTarget:g.originalTarget,delegate:&quot;.&quot;+g.handleCls,dynamic:g.dynamic,preserveRatio:g.preserveRatio,heightIncrement:g.heightIncrement,widthIncrement:g.widthIncrement,minHeight:g.minHeight,maxHeight:g.maxHeight,minWidth:g.minWidth,maxWidth:g.maxWidth});g.resizeTracker.on(&quot;mousedown&quot;,g.onBeforeResize,g);g.resizeTracker.on(&quot;drag&quot;,g.onResize,g);g.resizeTracker.on(&quot;dragend&quot;,g.onResizeEnd,g);if(g.handles==&quot;all&quot;){g.handles=&quot;n s e w ne nw se sw&quot;}k=g.handles=g.handles.split(/ |\s*?[,;]\s*?/);j=g.possiblePositions;e=k.length;b=g.handleCls+&quot; &quot;+(this.target.isComponent?(g.target.baseCls+&quot;-handle &quot;):&quot;&quot;)+g.handleCls+&quot;-&quot;;for(;c&lt;e;c++){if(k[c]&amp;&amp;j[k[c]]){h=j[k[c]];g[h]=Ext.create(&quot;Ext.Component&quot;,{owner:this,region:h,cls:b+h,renderTo:g.el});g[h].el.unselectable();if(g.transparent){g[h].el.setOpacity(0)}}}if(Ext.isNumber(g.width)){g.width=Ext.Number.constrain(g.width,g.minWidth,g.maxWidth)}if(Ext.isNumber(g.height)){g.height=Ext.Number.constrain(g.height,g.minHeight,g.maxHeight)}if(g.width!=null||g.height!=null){if(g.originalTarget){g.originalTarget.setWidth(g.width);g.originalTarget.setHeight(g.height)}g.resizeTo(g.width,g.height)}g.forceHandlesHeight()},disable:function(){this.resizeTracker.disable()},enable:function(){this.resizeTracker.enable()},onBeforeResize:function(c,d){var a=this.target.getBox();return this.fireEvent(&quot;beforeresize&quot;,this,a.width,a.height,d)},onResize:function(d,f){var c=this,a=c.target.getBox();c.forceHandlesHeight();return c.fireEvent(&quot;resizedrag&quot;,c,a.width,a.height,f)},onResizeEnd:function(d,f){var c=this,a=c.target.getBox();c.forceHandlesHeight();return c.fireEvent(&quot;resize&quot;,c,a.width,a.height,f)},resizeTo:function(b,a){this.target.setSize(b,a);this.fireEvent(&quot;resize&quot;,this,b,a,null)},getEl:function(){return this.el},getTarget:function(){return this.target},destroy:function(){var c;for(var b=0,a=this.handles.length;b&lt;a;b++){c=this[this.possiblePositions[this.handles[b]]];delete c.owner;Ext.destroy(c)}},forceHandlesHeight:function(){var a=this,b;if(Ext.isIE6){b=a.east;if(b){b.setHeight(a.el.getHeight())}b=a.west;if(b){b.setHeight(a.el.getHeight())}a.el.repaint()}}});Ext.define(&quot;Ext.panel.Tool&quot;,{extend:&quot;Ext.Component&quot;,requires:[&quot;Ext.tip.QuickTipManager&quot;],alias:&quot;widget.tool&quot;,baseCls:Ext.baseCSSPrefix+&quot;tool&quot;,disabledCls:Ext.baseCSSPrefix+&quot;tool-disabled&quot;,toolPressedCls:Ext.baseCSSPrefix+&quot;tool-pressed&quot;,toolOverCls:Ext.baseCSSPrefix+&quot;tool-over&quot;,ariaRole:&quot;button&quot;,renderTpl:['&lt;img id=&quot;{id}-toolEl&quot; src=&quot;{blank}&quot; class=&quot;{baseCls}-{type}&quot; role=&quot;presentation&quot;/&gt;'],tooltipType:&quot;qtip&quot;,stopEvent:true,initComponent:function(){var a=this;a.addEvents(&quot;click&quot;);a.type=a.type||a.id;Ext.applyIf(a.renderData,{baseCls:a.baseCls,blank:Ext.BLANK_IMAGE_URL,type:a.type});a.addChildEls(&quot;toolEl&quot;);a.tooltip=a.tooltip||a.qtip;a.callParent()},afterRender:function(){var b=this,a;b.callParent(arguments);if(b.tooltip){if(Ext.isObject(b.tooltip)){Ext.tip.QuickTipManager.register(Ext.apply({target:b.id},b.tooltip))}else{a=b.tooltipType==&quot;qtip&quot;?&quot;data-qtip&quot;:&quot;title&quot;;b.toolEl.dom.setAttribute(a,b.tooltip)}}b.mon(b.toolEl,{click:b.onClick,mousedown:b.onMouseDown,mouseover:b.onMouseOver,mouseout:b.onMouseOut,scope:b})},setType:function(a){var b=this;b.type=a;if(b.rendered){b.toolEl.dom.className=b.baseCls+&quot;-&quot;+a}return b},bindTo:function(a){this.owner=a},onClick:function(d,c){var b=this,a;if(b.disabled){return false}a=b.owner||b.ownerCt;b.el.removeCls(b.toolPressedCls);b.el.removeCls(b.toolOverCls);if(b.stopEvent!==false){d.stopEvent()}Ext.callback(b.handler,b.scope||b,[d,c,a,b]);b.fireEvent(&quot;click&quot;,b,d);return true},onDestroy:function(){if(Ext.isObject(this.tooltip)){Ext.tip.QuickTipManager.unregister(this.id)}this.callParent()},onMouseDown:function(){if(this.disabled){return false}this.el.addCls(this.toolPressedCls)},onMouseOver:function(){if(this.disabled){return false}this.el.addCls(this.toolOverCls)},onMouseOut:function(){this.el.removeCls(this.toolOverCls)}});Ext.define(&quot;Ext.util.CSS&quot;,function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,f){return f.charAt(1).toUpperCase()};return{singleton:true,constructor:function(){this.rules={};this.initialized=false},createStyleSheet:function(h,k){var g,f=c.getElementsByTagName(&quot;head&quot;)[0],j=c.createElement(&quot;style&quot;);j.setAttribute(&quot;type&quot;,&quot;text/css&quot;);if(k){j.setAttribute(&quot;id&quot;,k)}if(Ext.isIE){f.appendChild(j);g=j.styleSheet;g.cssText=h}else{try{j.appendChild(c.createTextNode(h))}catch(i){j.cssText=h}f.appendChild(j);g=j.styleSheet?j.styleSheet:(j.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(g);return g},removeStyleSheet:function(f){var e=document.getElementById(f);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(h,e){var g=document;this.removeStyleSheet(h);var f=g.createElement(&quot;link&quot;);f.setAttribute(&quot;rel&quot;,&quot;stylesheet&quot;);f.setAttribute(&quot;type&quot;,&quot;text/css&quot;);f.setAttribute(&quot;id&quot;,h);f.setAttribute(&quot;href&quot;,e);g.getElementsByTagName(&quot;head&quot;)[0].appendChild(f)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(k){if(!d){d={}}try{var n=k.cssRules||k.rules,l,h=n.length-1,f,g;for(;h&gt;=0;--h){l=n[h].selectorText;if(l){l=l.split(&quot;,&quot;);g=l.length;for(f=0;f&lt;g;f++){d[Ext.String.trim(l[f]).toLowerCase()]=n[h]}}}}catch(m){}},getRules:function(g){if(d===null||g){d={};var j=c.styleSheets,h=0,f=j.length;for(;h&lt;f;h++){try{if(!j[h].disabled){this.cacheStyleSheet(j[h])}}catch(k){}}}return d},getRule:function(e,g){var f=this.getRules(g);if(!Ext.isArray(e)){return f[e.toLowerCase()]}for(var h=0;h&lt;e.length;h++){if(f[e[h]]){return f[e[h].toLowerCase()]}}return null},updateRule:function(e,h,g){if(!Ext.isArray(e)){var j=this.getRule(e);if(j){j.style[h.replace(b,a)]=g;return true}}else{for(var f=0;f&lt;e.length;f++){if(this.updateRule(e[f],h,g)){return true}}}return false}}}());Ext.define(&quot;Ext.ElementLoader&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},uses:[&quot;Ext.data.Connection&quot;,&quot;Ext.Ajax&quot;],statics:{Renderer:{Html:function(a,b,c){a.getTarget().update(b.responseText,c.scripts===true);return true}}},url:null,params:null,baseParams:null,autoLoad:false,target:null,loadMask:false,ajaxOptions:null,scripts:false,isLoader:true,constructor:function(b){var c=this,a;b=b||{};Ext.apply(c,b);c.setTarget(c.target);c.addEvents(&quot;beforeload&quot;,&quot;exception&quot;,&quot;load&quot;);c.mixins.observable.constructor.call(c);if(c.autoLoad){a=c.autoLoad;if(a===true){a={}}c.load(a)}},setTarget:function(b){var a=this;b=Ext.get(b);if(a.target&amp;&amp;a.target!=b){a.abort()}a.target=b},getTarget:function(){return this.target||null},abort:function(){var a=this.active;if(a!==undefined){Ext.Ajax.abort(a.request);if(a.mask){this.removeMask()}delete this.active}},removeMask:function(){this.target.unmask()},addMask:function(a){this.target.mask(a===true?null:a)},load:function(h){h=Ext.apply({},h);var e=this,d=e.target,i=Ext.isDefined(h.loadMask)?h.loadMask:e.loadMask,b=Ext.apply({},h.params),a=Ext.apply({},h.ajaxOptions),f=h.callback||e.callback,g=h.scope||e.scope||e,c;Ext.applyIf(a,e.ajaxOptions);Ext.applyIf(h,a);Ext.applyIf(b,e.params);Ext.apply(b,e.baseParams);Ext.applyIf(h,{url:e.url});Ext.apply(h,{scope:e,params:b,callback:e.onComplete});if(e.fireEvent(&quot;beforeload&quot;,e,h)===false){return}if(i){e.addMask(i)}c=Ext.Ajax.request(h);e.active={request:c,options:h,mask:i,scope:g,callback:f,success:h.success||e.success,failure:h.failure||e.failure,renderer:h.renderer||e.renderer,scripts:Ext.isDefined(h.scripts)?h.scripts:e.scripts};e.setOptions(e.active,h)},setOptions:Ext.emptyFn,onComplete:function(b,g,a){var d=this,f=d.active,c=f.scope,e=d.getRenderer(f.renderer);if(g){g=e.call(d,d,a,f)}if(g){Ext.callback(f.success,c,[d,a,b]);d.fireEvent(&quot;load&quot;,d,a,b)}else{Ext.callback(f.failure,c,[d,a,b]);d.fireEvent(&quot;exception&quot;,d,a,b)}Ext.callback(f.callback,c,[d,g,a,b]);if(f.mask){d.removeMask()}delete d.active},getRenderer:function(a){if(Ext.isFunction(a)){return a}return this.statics().Renderer.Html},startAutoRefresh:function(a,b){var c=this;c.stopAutoRefresh();c.autoRefresh=setInterval(function(){c.load(b)},a)},stopAutoRefresh:function(){clearInterval(this.autoRefresh);delete this.autoRefresh},isAutoRefreshing:function(){return Ext.isDefined(this.autoRefresh)},destroy:function(){var a=this;a.stopAutoRefresh();delete a.target;a.abort();a.clearListeners()}});Ext.define(&quot;Ext.dd.DragTracker&quot;,{uses:[&quot;Ext.util.Region&quot;],mixins:{observable:&quot;Ext.util.Observable&quot;},active:false,trackOver:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents(&quot;mouseover&quot;,&quot;mouseout&quot;,&quot;mousedown&quot;,&quot;mouseup&quot;,&quot;mousemove&quot;,&quot;beforedragstart&quot;,&quot;dragstart&quot;,&quot;dragend&quot;,&quot;drag&quot;);this.dragRegion=Ext.create(&quot;Ext.util.Region&quot;,0,0,0,0);if(this.el){this.initEl(this.el)}this.mixins.observable.constructor.call(this);if(this.disabled){this.disable()}},initEl:function(a){this.el=Ext.get(a);this.handle=Ext.get(this.delegate);this.delegate=this.handle?undefined:this.delegate;if(!this.handle){this.handle=this.el}this.mon(this.handle,{mousedown:this.onMouseDown,delegate:this.delegate,scope:this});if(this.trackOver||this.overCls){this.mon(this.handle,{mouseover:this.onMouseOver,mouseout:this.onMouseOut,delegate:this.delegate,scope:this})}},disable:function(){this.disabled=true},enable:function(){this.disabled=false},destroy:function(){this.clearListeners();delete this.el},onMouseOver:function(c,b){var a=this;if(!a.disabled){if(Ext.EventManager.contains(c)||a.delegate){a.mouseIsOut=false;if(a.overCls){a.el.addCls(a.overCls)}a.fireEvent(&quot;mouseover&quot;,a,c,a.delegate?c.getTarget(a.delegate,b):a.handle)}}},onMouseOut:function(a){if(this.mouseIsDown){this.mouseIsOut=true}else{if(this.overCls){this.el.removeCls(this.overCls)}this.fireEvent(&quot;mouseout&quot;,this,a)}},onMouseDown:function(b,a){if(this.disabled||b.dragTracked){return}this.dragTarget=this.delegate?a:this.handle.dom;this.startXY=this.lastXY=b.getXY();this.startRegion=Ext.fly(this.dragTarget).getRegion();if(this.fireEvent(&quot;mousedown&quot;,this,b)===false||this.fireEvent(&quot;beforedragstart&quot;,this,b)===false||this.onBeforeStart(b)===false){return}this.mouseIsDown=true;b.dragTracked=true;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=Ext.defer(this.triggerStart,this.autoStart===true?1000:this.autoStart,this,[b])}},onMouseMove:function(d,c){if(this.active&amp;&amp;Ext.isIE&amp;&amp;!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.max(Math.abs(a[0]-b[0]),Math.abs(a[1]-b[1]))&gt;this.tolerance){this.triggerStart(d)}else{return}}if(this.fireEvent(&quot;mousemove&quot;,this,d)===false){this.onMouseUp(d)}else{this.onDrag(d);this.fireEvent(&quot;drag&quot;,this,d)}},onMouseUp:function(a){this.mouseIsDown=false;if(this.mouseIsOut){this.mouseIsOut=false;this.onMouseOut(a)}a.preventDefault();this.fireEvent(&quot;mouseup&quot;,this,a);this.endDrag(a)},endDrag:function(c){var b=Ext.getDoc(),a=this.active;b.un(&quot;mousemove&quot;,this.onMouseMove,this);b.un(&quot;mouseup&quot;,this.onMouseUp,this);b.un(&quot;selectstart&quot;,this.stopSelect,this);this.clearStart();this.active=false;if(a){this.onEnd(c);this.fireEvent(&quot;dragend&quot;,this,c)}delete this._constrainRegion;delete Ext.EventObject.dragTracked},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent(&quot;dragstart&quot;,this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getConstrainRegion:function(){if(this.constrainTo){if(this.constrainTo instanceof Ext.util.Region){return this.constrainTo}if(!this._constrainRegion){this._constrainRegion=Ext.fly(this.constrainTo).getViewRegion()}}else{if(!this._constrainRegion){this._constrainRegion=this.getDragCt().getViewRegion()}}return this._constrainRegion},getXY:function(a){return a?this.constrainModes[a](this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[b[0]-a[0],b[1]-a[1]]},constrainModes:{point:function(b,d){var c=b.dragRegion,a=b.getConstrainRegion();if(!a){return d}c.x=c.left=c[0]=c.right=d[0];c.y=c.top=c[1]=c.bottom=d[1];c.constrainTo(a);return[c.left,c.top]},dragTarget:function(c,f){var b=c.startXY,e=c.startRegion.copy(),a=c.getConstrainRegion(),d;if(!a){return f}e.translateBy(f[0]-b[0],f[1]-b[1]);if(e.right&gt;a.right){f[0]+=d=(a.right-e.right);e.left+=d}if(e.left&lt;a.left){f[0]+=(a.left-e.left)}if(e.bottom&gt;a.bottom){f[1]+=d=(a.bottom-e.bottom);e.top+=d}if(e.top&lt;a.top){f[1]+=(a.top-e.top)}return f}}});Ext.define(&quot;Ext.layout.component.Draw&quot;,{alias:&quot;layout.draw&quot;,extend:&quot;Ext.layout.component.Auto&quot;,type:&quot;draw&quot;,onLayout:function(b,a){this.owner.surface.setSize(b,a);this.callParent(arguments)}});Ext.define(&quot;Ext.menu.Item&quot;,{extend:&quot;Ext.Component&quot;,alias:&quot;widget.menuitem&quot;,alternateClassName:&quot;Ext.menu.TextItem&quot;,activeCls:Ext.baseCSSPrefix+&quot;menu-item-active&quot;,ariaRole:&quot;menuitem&quot;,canActivate:true,clickHideDelay:1,destroyMenu:true,disabledCls:Ext.baseCSSPrefix+&quot;menu-item-disabled&quot;,hideOnClick:true,isMenuItem:true,menuAlign:&quot;tl-tr?&quot;,menuExpandDelay:200,menuHideDelay:200,renderTpl:['&lt;tpl if=&quot;plain&quot;&gt;',&quot;{text}&quot;,&quot;&lt;/tpl&gt;&quot;,'&lt;tpl if=&quot;!plain&quot;&gt;','&lt;a id=&quot;{id}-itemEl&quot; class=&quot;'+Ext.baseCSSPrefix+'menu-item-link&quot; href=&quot;{href}&quot; &lt;tpl if=&quot;hrefTarget&quot;&gt;target=&quot;{hrefTarget}&quot;&lt;/tpl&gt; hidefocus=&quot;true&quot; unselectable=&quot;on&quot;&gt;','&lt;img id=&quot;{id}-iconEl&quot; src=&quot;{icon}&quot; class=&quot;'+Ext.baseCSSPrefix+'menu-item-icon {iconCls}&quot; /&gt;','&lt;span id=&quot;{id}-textEl&quot; class=&quot;'+Ext.baseCSSPrefix+'menu-item-text&quot; &lt;tpl if=&quot;menu&quot;&gt;style=&quot;margin-right: 17px;&quot;&lt;/tpl&gt; &gt;{text}&lt;/span&gt;','&lt;tpl if=&quot;menu&quot;&gt;','&lt;img id=&quot;{id}-arrowEl&quot; src=&quot;{blank}&quot; class=&quot;'+Ext.baseCSSPrefix+'menu-item-arrow&quot; /&gt;',&quot;&lt;/tpl&gt;&quot;,&quot;&lt;/a&gt;&quot;,&quot;&lt;/tpl&gt;&quot;],maskOnDisable:false,activate:function(){var a=this;if(!a.activated&amp;&amp;a.canActivate&amp;&amp;a.rendered&amp;&amp;!a.isDisabled()&amp;&amp;a.isVisible()){a.el.addCls(a.activeCls);a.focus();a.activated=true;a.fireEvent(&quot;activate&quot;,a)}},blur:function(){this.$focused=false;this.callParent(arguments)},deactivate:function(){var a=this;if(a.activated){a.el.removeCls(a.activeCls);a.blur();a.hideMenu();a.activated=false;a.fireEvent(&quot;deactivate&quot;,a)}},deferExpandMenu:function(){var a=this;if(!a.menu.rendered||!a.menu.isVisible()){a.parentMenu.activeChild=a.menu;a.menu.parentItem=a;a.menu.parentMenu=a.menu.ownerCt=a.parentMenu;a.menu.showBy(a,a.menuAlign)}},deferHideMenu:function(){if(this.menu.isVisible()){this.menu.hide()}},deferHideParentMenus:function(){Ext.menu.Manager.hideAll()},expandMenu:function(a){var b=this;if(b.menu){clearTimeout(b.hideMenuTimer);if(a===0){b.deferExpandMenu()}else{b.expandMenuTimer=Ext.defer(b.deferExpandMenu,Ext.isNumber(a)?a:b.menuExpandDelay,b)}}},focus:function(){this.$focused=true;this.callParent(arguments)},getRefItems:function(a){var c=this.menu,b;if(c){b=c.getRefItems(a);b.unshift(c)}return b||[]},hideMenu:function(a){var b=this;if(b.menu){clearTimeout(b.expandMenuTimer);b.hideMenuTimer=Ext.defer(b.deferHideMenu,Ext.isNumber(a)?a:b.menuHideDelay,b)}},initComponent:function(){var b=this,c=Ext.baseCSSPrefix,a=[c+&quot;menu-item&quot;];b.addEvents(&quot;activate&quot;,&quot;click&quot;,&quot;deactivate&quot;);if(b.plain){a.push(c+&quot;menu-item-plain&quot;)}if(b.cls){a.push(b.cls)}b.cls=a.join(&quot; &quot;);if(b.menu){b.menu=Ext.menu.Manager.get(b.menu)}b.callParent(arguments)},onClick:function(b){var a=this;if(!a.href){b.stopEvent()}if(a.disabled){return}if(a.hideOnClick){a.deferHideParentMenusTimer=Ext.defer(a.deferHideParentMenus,a.clickHideDelay,a)}Ext.callback(a.handler,a.scope||a,[a,b]);a.fireEvent(&quot;click&quot;,a,b);if(!a.hideOnClick){a.focus()}},onDestroy:function(){var a=this;clearTimeout(a.expandMenuTimer);clearTimeout(a.hideMenuTimer);clearTimeout(a.deferHideParentMenusTimer);if(a.menu){delete a.menu.parentItem;delete a.menu.parentMenu;delete a.menu.ownerCt;if(a.destroyMenu!==false){a.menu.destroy()}}a.callParent(arguments)},onRender:function(a,d){var b=this,c=Ext.BLANK_IMAGE_URL;Ext.applyIf(b.renderData,{href:b.href||&quot;#&quot;,hrefTarget:b.hrefTarget,icon:b.icon||c,iconCls:b.iconCls+(b.checkChangeDisabled?&quot; &quot;+b.disabledCls:&quot;&quot;),menu:Ext.isDefined(b.menu),plain:b.plain,text:b.text,blank:c});b.addChildEls(&quot;itemEl&quot;,&quot;iconEl&quot;,&quot;textEl&quot;,&quot;arrowEl&quot;);b.callParent(arguments)},setHandler:function(b,a){this.handler=b||null;this.scope=a},setIconCls:function(a){var b=this;if(b.iconEl){if(b.iconCls){b.iconEl.removeCls(b.iconCls)}if(a){b.iconEl.addCls(a)}}b.iconCls=a},setText:function(c){var b=this,a=b.textEl||b.el;b.text=c;if(b.rendered){a.update(c||&quot;&quot;);b.ownerCt.redoComponentLayout()}}});Ext.define(&quot;Ext.menu.KeyNav&quot;,{extend:&quot;Ext.util.KeyNav&quot;,requires:[&quot;Ext.FocusManager&quot;],constructor:function(b){var a=this;a.menu=b;a.callParent([b.el,{down:a.down,enter:a.enter,esc:a.escape,left:a.left,right:a.right,space:a.enter,tab:a.tab,up:a.up}])},down:function(b){var a=this,c=a.menu.focusedItem;if(c&amp;&amp;b.getKey()==Ext.EventObject.DOWN&amp;&amp;a.isWhitelisted(c)){return true}a.focusNextItem(1)},enter:function(b){var c=this.menu,a=c.focusedItem;if(c.activeItem){c.onClick(b)}else{if(a&amp;&amp;a.isFormField){return true}}},escape:function(a){Ext.menu.Manager.hideAll()},focusNextItem:function(f){var g=this.menu,b=g.items,d=g.focusedItem,c=d?b.indexOf(d):-1,a=c+f;while(a!=c){if(a&lt;0){a=b.length-1}else{if(a&gt;=b.length){a=0}}var e=b.getAt(a);if(g.canActivateItem(e)){g.setActiveItem(e);break}a+=f}},isWhitelisted:function(a){return Ext.FocusManager.isWhitelisted(a)},left:function(b){var c=this.menu,d=c.focusedItem,a=c.activeItem;if(d&amp;&amp;this.isWhitelisted(d)){return true}c.hide();if(c.parentMenu){c.parentMenu.focus()}},right:function(c){var d=this.menu,f=d.focusedItem,a=d.activeItem,b;if(f&amp;&amp;this.isWhitelisted(f)){return true}if(a){b=d.activeItem.menu;if(b){a.expandMenu(0);Ext.defer(function(){b.setActiveItem(b.items.getAt(0))},25)}}},tab:function(b){var a=this;if(b.shiftKey){a.up(b)}else{a.down(b)}},up:function(b){var a=this,c=a.menu.focusedItem;if(c&amp;&amp;b.getKey()==Ext.EventObject.UP&amp;&amp;a.isWhitelisted(c)){return true}a.focusNextItem(-1)}});Ext.define(&quot;Ext.menu.Separator&quot;,{extend:&quot;Ext.menu.Item&quot;,alias:&quot;widget.menuseparator&quot;,canActivate:false,focusable:false,hideOnClick:false,plain:true,separatorCls:Ext.baseCSSPrefix+&quot;menu-item-separator&quot;,text:&quot;&amp;#160;&quot;,onRender:function(b,d){var c=this,a=c.separatorCls;c.cls+=&quot; &quot;+a;c.callParent(arguments)}});Ext.define(&quot;Ext.data.AbstractStore&quot;,{requires:[&quot;Ext.util.MixedCollection&quot;,&quot;Ext.data.Operation&quot;,&quot;Ext.util.Filter&quot;],mixins:{observable:&quot;Ext.util.Observable&quot;,sortable:&quot;Ext.util.Sortable&quot;},statics:{create:function(a){if(!a.isStore){if(!a.type){a.type=&quot;store&quot;}a=Ext.createByAlias(&quot;store.&quot;+a.type,a)}return a}},remoteSort:false,remoteFilter:false,autoLoad:false,autoSync:false,batchUpdateMode:&quot;operation&quot;,filterOnLoad:true,sortOnLoad:true,implicitModel:false,defaultProxyType:&quot;memory&quot;,isDestroyed:false,isStore:true,sortRoot:&quot;data&quot;,constructor:function(a){var c=this,b;c.addEvents(&quot;add&quot;,&quot;remove&quot;,&quot;update&quot;,&quot;datachanged&quot;,&quot;beforeload&quot;,&quot;load&quot;,&quot;write&quot;,&quot;beforesync&quot;,&quot;clear&quot;);Ext.apply(c,a);c.removed=[];c.mixins.observable.constructor.apply(c,arguments);c.model=Ext.ModelManager.getModel(c.model);Ext.applyIf(c,{modelDefaults:{}});if(!c.model&amp;&amp;c.fields){c.model=Ext.define(&quot;Ext.data.Store.ImplicitModel-&quot;+(c.storeId||Ext.id()),{extend:&quot;Ext.data.Model&quot;,fields:c.fields,proxy:c.proxy||c.defaultProxyType});delete c.fields;c.implicitModel=true}c.setProxy(c.proxy||c.model.getProxy());if(c.id&amp;&amp;!c.storeId){c.storeId=c.id;delete c.id}if(c.storeId){Ext.data.StoreManager.register(c)}c.mixins.sortable.initSortable.call(c);b=c.decodeFilters(c.filters);c.filters=Ext.create(&quot;Ext.util.MixedCollection&quot;);c.filters.addAll(b)},setProxy:function(a){var b=this;if(a instanceof Ext.data.proxy.Proxy){a.setModel(b.model)}else{if(Ext.isString(a)){a={type:a}}Ext.applyIf(a,{model:b.model});a=Ext.createByAlias(&quot;proxy.&quot;+a.type,a)}b.proxy=a;return b.proxy},getProxy:function(){return this.proxy},create:function(e,c){var d=this,a=Ext.ModelManager.create(Ext.applyIf(e,d.modelDefaults),d.model.modelName),b;c=c||{};Ext.applyIf(c,{action:&quot;create&quot;,records:[a]});b=Ext.create(&quot;Ext.data.Operation&quot;,c);d.proxy.create(b,d.onProxyWrite,d);return a},read:function(){return this.load.apply(this,arguments)},onProxyRead:Ext.emptyFn,update:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:&quot;update&quot;,records:c.getUpdatedRecords()});a=Ext.create(&quot;Ext.data.Operation&quot;,b);return c.proxy.update(a,c.onProxyWrite,c)},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.action){case&quot;create&quot;:c.onCreateRecords(a,b,d);break;case&quot;update&quot;:c.onUpdateRecords(a,b,d);break;case&quot;destroy&quot;:c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent(&quot;write&quot;,c,b);c.fireEvent(&quot;datachanged&quot;,c)}Ext.callback(b.callback,b.scope||c,[a,b,d])},destroy:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:&quot;destroy&quot;,records:c.getRemovedRecords()});a=Ext.create(&quot;Ext.data.Operation&quot;,b);return c.proxy.destroy(a,c.onProxyWrite,c)},onBatchOperationComplete:function(b,a){return this.onProxyWrite(a)},onBatchComplete:function(c,a){var f=this,b=c.operations,e=b.length,d;f.suspendEvents();for(d=0;d&lt;e;d++){f.onProxyWrite(b[d])}f.resumeEvents();f.fireEvent(&quot;datachanged&quot;,f)},onBatchException:function(b,a){},filterNew:function(a){return a.phantom===true&amp;&amp;a.isValid()},getNewRecords:function(){return[]},getUpdatedRecords:function(){return[]},filterUpdated:function(a){return a.dirty===true&amp;&amp;a.phantom!==true&amp;&amp;a.isValid()},getRemovedRecords:function(){return this.removed},filter:function(a,b){},decodeFilters:function(e){if(!Ext.isArray(e)){if(e===undefined){e=[]}else{e=[e]}}var d=e.length,a=Ext.util.Filter,b,c;for(c=0;c&lt;d;c++){b=e[c];if(!(b instanceof a)){Ext.apply(b,{root:&quot;data&quot;});if(b.fn){b.filterFn=b.fn}if(typeof b==&quot;function&quot;){b={filterFn:b}}e[c]=new a(b)}}return e},clearFilter:function(a){},isFiltered:function(){},filterBy:function(b,a){},sync:function(){var d=this,b={},e=d.getNewRecords(),c=d.getUpdatedRecords(),a=d.getRemovedRecords(),f=false;if(e.length&gt;0){b.create=e;f=true}if(c.length&gt;0){b.update=c;f=true}if(a.length&gt;0){b.destroy=a;f=true}if(f&amp;&amp;d.fireEvent(&quot;beforesync&quot;,b)!==false){d.proxy.batch(b,d.getBatchListeners())}},getBatchListeners:function(){var b=this,a={scope:b,exception:b.onBatchException};if(b.batchUpdateMode==&quot;operation&quot;){a.operationcomplete=b.onBatchOperationComplete}else{a.complete=b.onBatchComplete}return a},save:function(){return this.sync.apply(this,arguments)},load:function(b){var c=this,a;b=b||{};Ext.applyIf(b,{action:&quot;read&quot;,filters:c.filters.items,sorters:c.getSorters()});a=Ext.create(&quot;Ext.data.Operation&quot;,b);if(c.fireEvent(&quot;beforeload&quot;,c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyLoad,c)}return c},afterEdit:function(a){var b=this;if(b.autoSync){b.sync()}b.fireEvent(&quot;update&quot;,b,a,Ext.data.Model.EDIT)},afterReject:function(a){this.fireEvent(&quot;update&quot;,this,a,Ext.data.Model.REJECT)},afterCommit:function(a){this.fireEvent(&quot;update&quot;,this,a,Ext.data.Model.COMMIT)},clearData:Ext.emptyFn,destroyStore:function(){var a=this;if(!a.isDestroyed){if(a.storeId){Ext.data.StoreManager.unregister(a)}a.clearData();a.data=null;a.tree=null;a.reader=a.writer=null;a.clearListeners();a.isDestroyed=true;if(a.implicitModel){Ext.destroy(a.model)}}},doSort:function(a){var b=this;if(b.remoteSort){b.load()}else{b.data.sortBy(a);b.fireEvent(&quot;datachanged&quot;,b)}},getCount:Ext.emptyFn,getById:Ext.emptyFn,removeAll:Ext.emptyFn,isLoading:function(){return !!this.loading}});Ext.define(&quot;Ext.util.Grouper&quot;,{extend:&quot;Ext.util.Sorter&quot;,getGroupString:function(a){return a.get(this.property)}});Ext.define(&quot;Ext.draw.CompositeSprite&quot;,{extend:&quot;Ext.util.MixedCollection&quot;,mixins:{animate:&quot;Ext.util.Animate&quot;},isCompositeSprite:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents(&quot;mousedown&quot;,&quot;mouseup&quot;,&quot;mouseover&quot;,&quot;mouseout&quot;,&quot;click&quot;);b.id=Ext.id(null,&quot;ext-sprite-group-&quot;);b.callParent()},onClick:function(a){this.fireEvent(&quot;click&quot;,a)},onMouseUp:function(a){this.fireEvent(&quot;mouseup&quot;,a)},onMouseDown:function(a){this.fireEvent(&quot;mousedown&quot;,a)},onMouseOver:function(a){this.fireEvent(&quot;mouseover&quot;,a)},onMouseOut:function(a){this.fireEvent(&quot;mouseout&quot;,a)},attachEvents:function(b){var a=this;b.on({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick})},add:function(b,c){var a=this.callParent(arguments);this.attachEvents(a);return a},insert:function(a,b,c){return this.callParent(arguments)},remove:function(b){var a=this;b.un({scope:a,mousedown:a.onMouseDown,mouseup:a.onMouseUp,mouseover:a.onMouseOver,mouseout:a.onMouseOut,click:a.onClick});return a.callParent(arguments)},getBBox:function(){var e=0,m,h,j=this.items,f=this.length,g=Infinity,c=g,l=-g,b=g,k=-g,d,a;for(;e&lt;f;e++){m=j[e];if(m.el){h=m.getBBox();c=Math.min(c,h.x);b=Math.min(b,h.y);l=Math.max(l,h.height+h.y);k=Math.max(k,h.width+h.x)}}return{x:c,y:b,height:l-b,width:k-c}},setAttributes:function(c,e){var d=0,b=this.items,a=this.length;for(;d&lt;a;d++){b[d].setAttributes(c,e)}return this},hide:function(d){var c=0,b=this.items,a=this.length;for(;c&lt;a;c++){b[c].hide(d)}return this},show:function(d){var c=0,b=this.items,a=this.length;for(;c&lt;a;c++){b[c].show(d)}return this},redraw:function(){var e=this,d=0,c=e.items,b=e.getSurface(),a=e.length;if(b){for(;d&lt;a;d++){b.renderItem(c[d])}}return e},setStyle:function(f){var c=0,b=this.items,a=this.length,e,d;for(;c&lt;a;c++){e=b[c];d=e.el;if(d){d.setStyle(f)}}},addCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d&lt;a;d++){b.addCls(c[d],e)}}},removeCls:function(e){var d=0,c=this.items,b=this.getSurface(),a=this.length;if(b){for(;d&lt;a;d++){b.removeCls(c[d],e)}}},getSurface:function(){var a=this.first();if(a){return a.surface}return null},destroy:function(){var c=this,a=c.getSurface(),b;if(a){while(c.getCount()&gt;0){b=c.first();c.remove(b);a.remove(b)}}c.clearListeners()}});Ext.define(&quot;Ext.layout.container.AbstractFit&quot;,{extend:&quot;Ext.layout.container.Container&quot;,itemCls:Ext.baseCSSPrefix+&quot;fit-item&quot;,targetCls:Ext.baseCSSPrefix+&quot;layout-fit&quot;,type:&quot;fit&quot;});Ext.define(&quot;Ext.ComponentLoader&quot;,{extend:&quot;Ext.ElementLoader&quot;,statics:{Renderer:{Data:function(a,b,d){var f=true;try{a.getTarget().update(Ext.decode(b.responseText))}catch(c){f=false}return f},Component:function(a,c,g){var h=true,f=a.getTarget(),b=[];try{b=Ext.decode(c.responseText)}catch(d){h=false}if(h){if(g.removeAll){f.removeAll()}f.add(b)}return h}}},target:null,loadMask:false,renderer:&quot;html&quot;,setTarget:function(b){var a=this;if(Ext.isString(b)){b=Ext.getCmp(b)}if(a.target&amp;&amp;a.target!=b){a.abort()}a.target=b},removeMask:function(){this.target.setLoading(false)},addMask:function(a){this.target.setLoading(a)},setOptions:function(b,a){b.removeAll=Ext.isDefined(a.removeAll)?a.removeAll:this.removeAll},getRenderer:function(b){if(Ext.isFunction(b)){return b}var a=this.statics().Renderer;switch(b){case&quot;component&quot;:return a.Component;case&quot;data&quot;:return a.Data;default:return Ext.ElementLoader.Renderer.Html}}});Ext.define(&quot;Ext.util.ComponentDragger&quot;,{extend:&quot;Ext.dd.DragTracker&quot;,autoStart:500,constructor:function(a,b){this.comp=a;this.initialConstrainTo=b.constrainTo;this.callParent([b])},onStart:function(c){var b=this,a=b.comp;this.startPosition=a.getPosition();if(a.ghost&amp;&amp;!a.liveDrag){b.proxy=a.ghost();b.dragTarget=b.proxy.header.el}if(b.constrain||b.constrainDelegate){b.constrainTo=b.calculateConstrainRegion()}},calculateConstrainRegion:function(){var d=this,a=d.comp,g=d.initialConstrainTo,e,f,b=a.el.shadow?a.el.shadow.offset:0;if(!(g instanceof Ext.util.Region)){g=Ext.fly(g).getViewRegion()}if(b){g.adjust(0,-b,-b,b)}if(!d.constrainDelegate){e=Ext.fly(d.dragTarget).getRegion();f=d.proxy?d.proxy.el.getRegion():a.el.getRegion();g.adjust(e.top-f.top,e.right-f.right,e.bottom-f.bottom,e.left-f.left)}return g},onDrag:function(c){var b=this,a=(b.proxy&amp;&amp;!b.comp.liveDrag)?b.proxy:b.comp,d=b.getOffset(b.constrain||b.constrainDelegate?&quot;dragTarget&quot;:null);a.setPosition(b.startPosition[0]+d[0],b.startPosition[1]+d[1])},onEnd:function(a){if(this.proxy&amp;&amp;!this.comp.liveDrag){this.comp.unghost()}}});Ext.define(&quot;Ext.window.Window&quot;,{extend:&quot;Ext.panel.Panel&quot;,alternateClassName:&quot;Ext.Window&quot;,requires:[&quot;Ext.util.ComponentDragger&quot;,&quot;Ext.util.Region&quot;,&quot;Ext.EventManager&quot;],alias:&quot;widget.window&quot;,baseCls:Ext.baseCSSPrefix+&quot;window&quot;,resizable:true,draggable:true,constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,collapsible:false,closable:true,hidden:true,autoRender:true,hideMode:&quot;visibility&quot;,floating:true,ariaRole:&quot;alertdialog&quot;,itemCls:&quot;x-window-item&quot;,overlapHeader:true,ignoreHeaderBorderManagement:true,initComponent:function(){var a=this;a.callParent();a.addEvents(&quot;resize&quot;,&quot;maximize&quot;,&quot;minimize&quot;,&quot;restore&quot;);if(a.plain){a.addClsWithUI(&quot;plain&quot;)}if(a.modal){a.ariaRole=&quot;dialog&quot;}},initStateEvents:function(){var a=this.stateEvents;Ext.each([&quot;maximize&quot;,&quot;restore&quot;,&quot;resize&quot;,&quot;dragend&quot;],function(b){if(Ext.Array.indexOf(a,b)){a.push(b)}});this.callParent()},getState:function(){var b=this,c=b.callParent()||{},a=!!b.maximized;c.maximized=a;Ext.apply(c,{size:a?b.restoreSize:b.getSize(),pos:a?b.restorePos:b.getPosition()});return c},applyState:function(b){var a=this;if(b){a.maximized=b.maximized;if(a.maximized){a.hasSavedRestore=true;a.restoreSize=b.size;a.restorePos=b.pos}else{Ext.apply(a,{width:b.size.width,height:b.size.height,x:b.pos[0],y:b.pos[1]})}}},onMouseDown:function(b){var a;if(this.floating){if(Ext.fly(b.getTarget()).focusable()){a=true}this.toFront(a)}},onRender:function(b,a){var c=this;c.callParent(arguments);c.focusEl=c.el;if(c.maximizable){c.header.on({dblclick:{fn:c.toggleMaximize,element:&quot;el&quot;,scope:c}})}},afterRender:function(){var a=this,b=a.hidden,c;a.hidden=false;a.callParent();a.hidden=b;a.proxy=a.getProxy();a.mon(a.el,&quot;mousedown&quot;,a.onMouseDown,a);a.el.set({tabIndex:-1});if(a.maximized){a.maximized=false;a.maximize()}if(a.closable){c=a.getKeyMap();c.on(27,a.onEsc,a);c.disable()}if(!b){a.syncMonitorWindowResize();a.doConstrain()}},initDraggable:function(){var b=this,a;if(!b.header){b.updateHeader(true)}if(b.header){a=Ext.applyIf({el:b.el,delegate:&quot;#&quot;+b.header.id},b.draggable);if(b.constrain||b.constrainHeader){a.constrain=b.constrain;a.constrainDelegate=b.constrainHeader;a.constrainTo=b.constrainTo||b.container}b.dd=Ext.create(&quot;Ext.util.ComponentDragger&quot;,this,a);b.relayEvents(b.dd,[&quot;dragstart&quot;,&quot;drag&quot;,&quot;dragend&quot;])}},onEsc:function(a,b){b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){var a=this;if(a.rendered){delete this.animateTarget;a.hide();Ext.destroy(a.keyMap)}a.callParent()},addTools:function(){var a=this;a.callParent();if(a.minimizable){a.addTool({type:&quot;minimize&quot;,handler:Ext.Function.bind(a.minimize,a,[])})}if(a.maximizable){a.addTool({type:&quot;maximize&quot;,handler:Ext.Function.bind(a.maximize,a,[])});a.addTool({type:&quot;restore&quot;,handler:Ext.Function.bind(a.restore,a,[]),hidden:true})}},getFocusEl:function(){var d=this,g=d.focusEl,e=d.defaultButton||d.defaultFocus,b=typeof db,c,a;if(Ext.isDefined(e)){if(Ext.isNumber(e)){g=d.query(&quot;button&quot;)[e]}else{if(Ext.isString(e)){g=d.down(&quot;#&quot;+e)}else{g=e}}}return g||d.focusEl},beforeShow:function(){this.callParent();if(this.expandOnShow){this.expand(false)}},afterShow:function(c){var b=this,a=c||b.animateTarget;b.callParent(arguments);if(b.maximized){b.fitContainer()}b.syncMonitorWindowResize();if(!a){b.doConstrain()}if(b.keyMap){b.keyMap.enable()}},doClose:function(){var a=this;if(a.hidden){a.fireEvent(&quot;close&quot;,a);if(a.closeAction==&quot;destroy&quot;){this.destroy()}}else{a.hide(a.animateTarget,a.doClose,a)}},afterHide:function(){var a=this;a.syncMonitorWindowResize();if(a.keyMap){a.keyMap.disable()}a.callParent(arguments)},onWindowResize:function(){if(this.maximized){this.fitContainer()}this.doConstrain()},minimize:function(){this.fireEvent(&quot;minimize&quot;,this);return this},afterCollapse:function(){var a=this;if(a.maximizable){a.tools.maximize.hide();a.tools.restore.hide()}if(a.resizer){a.resizer.disable()}a.callParent(arguments)},afterExpand:function(){var a=this;if(a.maximized){a.tools.restore.show()}else{if(a.maximizable){a.tools.maximize.show()}}if(a.resizer){a.resizer.enable()}a.callParent(arguments)},maximize:function(){var a=this;if(!a.maximized){a.expand(false);if(!a.hasSavedRestore){a.restoreSize=a.getSize();a.restorePos=a.getPosition(true)}if(a.maximizable){a.tools.maximize.hide();a.tools.restore.show()}a.maximized=true;a.el.disableShadow();if(a.dd){a.dd.disable()}if(a.collapseTool){a.collapseTool.hide()}a.el.addCls(Ext.baseCSSPrefix+&quot;window-maximized&quot;);a.container.addCls(Ext.baseCSSPrefix+&quot;window-maximized-ct&quot;);a.syncMonitorWindowResize();a.setPosition(0,0);a.fitContainer();a.fireEvent(&quot;maximize&quot;,a)}return a},restore:function(){var a=this,b=a.tools;if(a.maximized){delete a.hasSavedRestore;a.removeCls(Ext.baseCSSPrefix+&quot;window-maximized&quot;);if(b.restore){b.restore.hide()}if(b.maximize){b.maximize.show()}if(a.collapseTool){a.collapseTool.show()}a.setPosition(a.restorePos);a.setSize(a.restoreSize);delete a.restorePos;delete a.restoreSize;a.maximized=false;a.el.enableShadow(true);if(a.dd){a.dd.enable()}a.container.removeCls(Ext.baseCSSPrefix+&quot;window-maximized-ct&quot;);a.syncMonitorWindowResize();a.doConstrain();a.fireEvent(&quot;restore&quot;,a)}return a},syncMonitorWindowResize:function(){var b=this,c=b._monitoringResize,d=b.monitorResize||b.constrain||b.constrainHeader||b.maximized,a=b.hidden||b.destroying||b.isDestroyed;if(d&amp;&amp;!a){if(!c){Ext.EventManager.onWindowResize(b.onWindowResize,b);b._monitoringResize=true}}else{if(c){Ext.EventManager.removeResizeListener(b.onWindowResize,b);b._monitoringResize=false}}},toggleMaximize:function(){return this[this.maximized?&quot;restore&quot;:&quot;maximize&quot;]()}});Ext.define(&quot;Ext.data.Store&quot;,{extend:&quot;Ext.data.AbstractStore&quot;,alias:&quot;store.store&quot;,requires:[&quot;Ext.data.StoreManager&quot;,&quot;Ext.ModelManager&quot;,&quot;Ext.data.Model&quot;,&quot;Ext.util.Grouper&quot;],uses:[&quot;Ext.data.proxy.Memory&quot;],remoteSort:false,remoteFilter:false,remoteGroup:false,groupField:undefined,groupDir:&quot;ASC&quot;,pageSize:25,currentPage:1,clearOnPageLoad:true,loading:false,sortOnFilter:true,buffered:false,purgePageCount:5,isStore:true,onClassExtended:function(a,c){var b=c.model;if(typeof b==&quot;string&quot;){var d=c.onBeforeClassCreated;c.onBeforeClassCreated=function(e,g){var f=this;Ext.require(b,function(){d.call(f,e,g)})}}},constructor:function(b){b=Ext.Object.merge({},b);var d=this,f=b.groupers||d.groupers,a=b.groupField||d.groupField,c,e;if(b.buffered||d.buffered){d.prefetchData=Ext.create(&quot;Ext.util.MixedCollection&quot;,false,function(g){return g.index});d.pendingRequests=[];d.pagesRequested=[];d.sortOnLoad=false;d.filterOnLoad=false}d.addEvents(&quot;beforeprefetch&quot;,&quot;groupchange&quot;,&quot;prefetch&quot;);e=b.data||d.data;d.data=Ext.create(&quot;Ext.util.MixedCollection&quot;,false,function(g){return g.internalId});if(e){d.inlineData=e;delete b.data}if(!f&amp;&amp;a){f=[{property:a,direction:b.groupDir||d.groupDir}]}delete b.groupers;d.groupers=Ext.create(&quot;Ext.util.MixedCollection&quot;);d.groupers.addAll(d.decodeGroupers(f));this.callParent([b]);if(d.groupers.items.length){d.sort(d.groupers.items,&quot;prepend&quot;,false)}c=d.proxy;e=d.inlineData;if(e){if(c instanceof Ext.data.proxy.Memory){c.data=e;d.read()}else{d.add.apply(d,e)}d.sort();delete d.inlineData}else{if(d.autoLoad){Ext.defer(d.load,10,d,[typeof d.autoLoad===&quot;object&quot;?d.autoLoad:undefined])}}},onBeforeSort:function(){var a=this.groupers;if(a.getCount()&gt;0){this.sort(a.items,&quot;prepend&quot;,false)}},decodeGroupers:function(d){if(!Ext.isArray(d)){if(d===undefined){d=[]}else{d=[d]}}var c=d.length,e=Ext.util.Grouper,a,b;for(b=0;b&lt;c;b++){a=d[b];if(!(a instanceof e)){if(Ext.isString(a)){a={property:a}}Ext.applyIf(a,{root:&quot;data&quot;,direction:&quot;ASC&quot;});if(a.fn){a.sorterFn=a.fn}if(typeof a==&quot;function&quot;){a={sorterFn:a}}d[b]=new e(a)}}return d},group:function(e,f){var d=this,c=false,b,a;if(Ext.isArray(e)){a=e}else{if(Ext.isObject(e)){a=[e]}else{if(Ext.isString(e)){b=d.groupers.get(e);if(!b){b={property:e,direction:f};a=[b]}else{if(f===undefined){b.toggle()}else{b.setDirection(f)}}}}}if(a&amp;&amp;a.length){c=true;a=d.decodeGroupers(a);d.groupers.clear();d.groupers.addAll(a)}if(d.remoteGroup){d.load({scope:d,callback:d.fireGroupChange})}else{d.sort(null,null,null,c);d.fireGroupChange()}},clearGrouping:function(){var a=this;a.groupers.each(function(b){a.sorters.remove(b)});a.groupers.clear();if(a.remoteGroup){a.load({scope:a,callback:a.fireGroupChange})}else{a.sort();a.fireEvent(&quot;groupchange&quot;,a,a.groupers)}},isGrouped:function(){return this.groupers.getCount()&gt;0},fireGroupChange:function(){this.fireEvent(&quot;groupchange&quot;,this,this.groupers)},getGroups:function(b){var d=this.data.items,a=d.length,c=[],j={},f,g,h,e;for(e=0;e&lt;a;e++){f=d[e];g=this.getGroupString(f);h=j[g];if(h===undefined){h={name:g,children:[]};c.push(h);j[g]=h}h.children.push(f)}return b?j[b]:c},getGroupsForGrouper:function(f,b){var d=f.length,e=[],a,c,h,j,g;for(g=0;g&lt;d;g++){h=f[g];c=b.getGroupString(h);if(c!==a){j={name:c,grouper:b,records:[]};e.push(j)}j.records.push(h);a=c}return e},getGroupsForGrouperIndex:function(c,h){var f=this,g=f.groupers,b=g.getAt(h),a=f.getGroupsForGrouper(c,b),e=a.length,d;if(h+1&lt;g.length){for(d=0;d&lt;e;d++){a[d].children=f.getGroupsForGrouperIndex(a[d].records,h+1)}}for(d=0;d&lt;e;d++){a[d].depth=h}return a},getGroupData:function(a){var b=this;if(a!==false){b.sort()}return b.getGroupsForGrouperIndex(b.data.items,0)},getGroupString:function(a){var b=this.groupers.first();if(b){return a.get(b.property)}return&quot;&quot;},insert:function(d,c){var g=this,f=false,e,b,a;c=[].concat(c);for(e=0,a=c.length;e&lt;a;e++){b=g.createModel(c[e]);b.set(g.modelDefaults);c[e]=b;g.data.insert(d+e,b);b.join(g);f=f||b.phantom===true}if(g.snapshot){g.snapshot.addAll(c)}g.fireEvent(&quot;add&quot;,g,c,d);g.fireEvent(&quot;datachanged&quot;,g);if(g.autoSync&amp;&amp;f){g.sync()}},add:function(b){if(!Ext.isArray(b)){b=Array.prototype.slice.apply(arguments)}var e=this,c=0,d=b.length,a;for(;c&lt;d;c++){a=e.createModel(b[c]);b[c]=a}e.insert(e.data.length,b);return b},createModel:function(a){if(!a.isModel){a=Ext.ModelManager.create(a,this.model)}return a},each:function(b,a){this.data.each(b,a)},remove:function(b,j){if(!Ext.isArray(b)){b=[b]}j=j===true;var f=this,g=false,c=0,a=b.length,h,e,d;for(;c&lt;a;c++){d=b[c];e=f.data.indexOf(d);if(f.snapshot){f.snapshot.remove(d)}if(e&gt;-1){h=d.phantom===true;if(!j&amp;&amp;!h){f.removed.push(d)}d.unjoin(f);f.data.remove(d);g=g||!h;f.fireEvent(&quot;remove&quot;,f,d,e)}}f.fireEvent(&quot;datachanged&quot;,f);if(!j&amp;&amp;f.autoSync&amp;&amp;g){f.sync()}},removeAt:function(b){var a=this.getAt(b);if(a){this.remove(a)}},load:function(a){var b=this;a=a||{};if(Ext.isFunction(a)){a={callback:a}}Ext.applyIf(a,{groupers:b.groupers.items,page:b.currentPage,start:(b.currentPage-1)*b.pageSize,limit:b.pageSize,addRecords:false});return b.callParent([a])},onProxyLoad:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total}if(e){d.loadRecords(a,b)}d.loading=false;d.fireEvent(&quot;load&quot;,d,a,e);d.fireEvent(&quot;read&quot;,d,a,b.wasSuccessful());Ext.callback(b.callback,b.scope||d,[a,b,e])},onCreateRecords:function(d,e,l){if(l){var g=0,f=this.data,a=this.snapshot,b=d.length,k=e.records,h,c,j;for(;g&lt;b;++g){h=d[g];c=k[g];if(c){j=f.indexOf(c);if(j&gt;-1){f.removeAt(j);f.insert(j,h)}if(a){j=a.indexOf(c);if(j&gt;-1){a.removeAt(j);a.insert(j,h)}}h.phantom=false;h.join(this)}}}},onUpdateRecords:function(d,c,h){if(h){var e=0,f=d.length,g=this.data,b=this.snapshot,a;for(;e&lt;f;++e){a=d[e];g.replace(a);if(b){b.replace(a)}a.join(this)}}},onDestroyRecords:function(c,d,j){if(j){var h=this,f=0,b=c.length,e=h.data,a=h.snapshot,g;for(;f&lt;b;++f){g=c[f];g.unjoin(h);e.remove(g);if(a){a.remove(g)}}h.removed=[]}},getNewRecords:function(){return this.data.filterBy(this.filterNew).items},getUpdatedRecords:function(){return this.data.filterBy(this.filterUpdated).items},filter:function(e,f){if(Ext.isString(e)){e={property:e,value:f}}var d=this,a=d.decodeFilters(e),b=0,g=d.sortOnFilter&amp;&amp;!d.remoteSort,c=a.length;for(;b&lt;c;b++){d.filters.replace(a[b])}if(d.remoteFilter){d.load()}else{if(d.filters.getCount()){d.snapshot=d.snapshot||d.data.clone();d.data=d.data.filter(d.filters.items);if(g){d.sort()}if(!g||d.sorters.length&lt;1){d.fireEvent(&quot;datachanged&quot;,d)}}}},clearFilter:function(a){var b=this;b.filters.clear();if(b.remoteFilter){b.load()}else{if(b.isFiltered()){b.data=b.snapshot.clone();delete b.snapshot;if(a!==true){b.fireEvent(&quot;datachanged&quot;,b)}}}},isFiltered:function(){var a=this.snapshot;return !!a&amp;&amp;a!==this.data},filterBy:function(b,a){var c=this;c.snapshot=c.snapshot||c.data.clone();c.data=c.queryBy(b,a||c);c.fireEvent(&quot;datachanged&quot;,c)},queryBy:function(b,a){var c=this,d=c.snapshot||c.data;return d.filterBy(b,a||c)},loadData:function(g,a){var c=this.model,f=g.length,e=[],d,b;for(d=0;d&lt;f;d++){b=g[d];if(!(b instanceof Ext.data.Model)){b=Ext.ModelManager.create(b,c)}e.push(b)}this.loadRecords(e,{addRecords:a})},loadRawData:function(e,b){var d=this,a=d.proxy.reader.read(e),c=a.records;if(a.success){d.loadRecords(c,{addRecords:b});d.fireEvent(&quot;load&quot;,d,c,true)}},loadRecords:function(a,b){var e=this,c=0,d=a.length;b=b||{};if(!b.addRecords){delete e.snapshot;e.clearData()}e.data.addAll(a);for(;c&lt;d;c++){if(b.start!==undefined){a[c].index=b.start+c}a[c].join(e)}e.suspendEvents();if(e.filterOnLoad&amp;&amp;!e.remoteFilter){e.filter()}if(e.sortOnLoad&amp;&amp;!e.remoteSort){e.sort()}e.resumeEvents();e.fireEvent(&quot;datachanged&quot;,e,a)},loadPage:function(c,a){var b=this;a=Ext.apply({},a);b.currentPage=c;b.read(Ext.applyIf(a,{page:c,start:(c-1)*b.pageSize,limit:b.pageSize,addRecords:!b.clearOnPageLoad}))},nextPage:function(a){this.loadPage(this.currentPage+1,a)},previousPage:function(a){this.loadPage(this.currentPage-1,a)},clearData:function(){var a=this;a.data.each(function(b){b.unjoin(a)});a.data.clear()},prefetch:function(b){var c=this,a,d=c.getRequestId();b=b||{};Ext.applyIf(b,{action:&quot;read&quot;,filters:c.filters.items,sorters:c.sorters.items,requestId:d});c.pendingRequests.push(d);a=Ext.create(&quot;Ext.data.Operation&quot;,b);if(c.fireEvent(&quot;beforeprefetch&quot;,c,a)!==false){c.loading=true;c.proxy.read(a,c.onProxyPrefetch,c)}return c},prefetchPage:function(e,c){var d=this,b=d.pageSize,f=(e-1)*d.pageSize,a=f+b;if(Ext.Array.indexOf(d.pagesRequested,e)===-1&amp;&amp;!d.rangeSatisfied(f,a)){c=c||{};d.pagesRequested.push(e);Ext.applyIf(c,{page:e,start:f,limit:b,callback:d.onWaitForGuarantee,scope:d});d.prefetch(c)}},getRequestId:function(){this.requestSeed=this.requestSeed||1;return this.requestSeed++},onProxyPrefetch:function(b){var d=this,c=b.getResultSet(),a=b.getRecords(),e=b.wasSuccessful();if(c){d.totalCount=c.total;d.fireEvent(&quot;totalcountchange&quot;,d.totalCount)}if(e){d.cacheRecords(a,b)}Ext.Array.remove(d.pendingRequests,b.requestId);if(b.page){Ext.Array.remove(d.pagesRequested,b.page)}d.loading=false;d.fireEvent(&quot;prefetch&quot;,d,a,e,b);if(b.blocking){d.fireEvent(&quot;load&quot;,d,a,e)}Ext.callback(b.callback,b.scope||d,[a,b,e])},cacheRecords:function(b,a){var e=this,c=0,d=b.length,f=a?a.start:0;if(!Ext.isDefined(e.totalCount)){e.totalCount=b.length;e.fireEvent(&quot;totalcountchange&quot;,e.totalCount)}for(;c&lt;d;c++){b[c].index=f+c}e.prefetchData.addAll(b);if(e.purgePageCount){e.purgeRecords()}},purgeRecords:function(){var c=this,b=c.prefetchData.getCount(),d=c.purgePageCount*c.pageSize,e=b-d-1,a=0;for(;a&lt;=e;a++){c.prefetchData.removeAt(0)}},rangeSatisfied:function(e,a){var c=this,b=e,d=true;for(;b&lt;a;b++){if(!c.prefetchData.getByKey(b)){d=false;break}}return d},getPageFromRecordIndex:function(a){return Math.floor(a/this.pageSize)+1},onGuaranteedRange:function(){var f=this,c=f.getTotalCount(),g=f.requestStart,b=((c-1)&lt;f.requestEnd)?c-1:f.requestEnd,d=[],a,e=g;b=Math.max(0,b);if(g!==f.guaranteedStart&amp;&amp;b!==f.guaranteedEnd){f.guaranteedStart=g;f.guaranteedEnd=b;for(;e&lt;=b;e++){a=f.prefetchData.getByKey(e);if(a){d.push(a)}}f.fireEvent(&quot;guaranteedrange&quot;,d,g,b);if(f.cb){f.cb.call(f.scope||f,d)}}f.unmask()},mask:function(){this.masked=true;this.fireEvent(&quot;beforeload&quot;)},unmask:function(){if(this.masked){this.fireEvent(&quot;load&quot;)}},hasPendingRequests:function(){return this.pendingRequests.length},onWaitForGuarantee:function(){if(!this.hasPendingRequests()){this.onGuaranteedRange()}},guaranteeRange:function(a,c,b,m){c=(c&gt;this.totalCount)?this.totalCount-1:c;var h=this,d=a,k=h.prefetchData,e=[],g=!!k.getByKey(a),j=!!k.getByKey(c),f=h.getPageFromRecordIndex(a),l=h.getPageFromRecordIndex(c);h.cb=b;h.scope=m;h.requestStart=a;h.requestEnd=c;if(!g||!j){if(f===l){h.mask();h.prefetchPage(f,{callback:h.onWaitForGuarantee,scope:h})}else{h.mask();h.prefetchPage(f,{callback:h.onWaitForGuarantee,scope:h});h.prefetchPage(l,{callback:h.onWaitForGuarantee,scope:h})}}else{h.onGuaranteedRange()}},sort:function(){var d=this,c=d.prefetchData,e,f,a,b;if(d.buffered){if(d.remoteSort){c.clear();d.callParent(arguments)}else{e=d.getSorters();f=d.guaranteedStart;a=d.guaranteedEnd;if(e.length){c.sort(e);b=c.getRange();c.clear();d.cacheRecords(b);delete d.guaranteedStart;delete d.guaranteedEnd;d.guaranteeRange(f,a)}d.callParent(arguments)}}else{d.callParent(arguments)}},doSort:function(b){var e=this;if(e.remoteSort){e.load()}else{e.data.sortBy(b);if(!e.buffered){var a=e.getRange(),d=a.length,c=0;for(;c&lt;d;c++){a[c].index=c}}e.fireEvent(&quot;datachanged&quot;,e)}},find:function(e,d,g,f,a,c){var b=this.createFilterFn(e,d,f,a,c);return b?this.data.findIndexBy(b,null,g):-1},findRecord:function(){var b=this,a=b.find.apply(b,arguments);return a!==-1?b.getAt(a):null},createFilterFn:function(d,c,e,a,b){if(Ext.isEmpty(c)){return false}c=this.data.createValueMatcher(c,e,a,b);return function(f){return c.test(f.data[d])}},findExact:function(b,a,c){return this.data.findIndexBy(function(d){return d.get(b)==a},this,c)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},collect:function(b,a,c){var d=this,e=(c===true&amp;&amp;d.snapshot)?d.snapshot:d.data;return e.collect(b,&quot;data&quot;,a)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalCount},getAt:function(a){return this.data.getAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},getById:function(a){return(this.snapshot||this.data).findBy(function(b){return b.getId()===a})},indexOf:function(a){return this.data.indexOf(a)},indexOfTotal:function(a){var b=a.index;if(b||b===0){return b}return this.indexOf(a)},indexOfId:function(a){return this.indexOf(this.getById(a))},removeAll:function(a){var b=this;b.clearData();if(b.snapshot){b.snapshot.clear()}if(a!==true){b.fireEvent(&quot;clear&quot;,b)}},first:function(a){var b=this;if(a&amp;&amp;b.isGrouped()){return b.aggregate(function(c){return c.length?c[0]:undefined},b,true)}else{return b.data.first()}},last:function(a){var b=this;if(a&amp;&amp;b.isGrouped()){return b.aggregate(function(d){var c=d.length;return c?d[c-1]:undefined},b,true)}else{return b.data.last()}},sum:function(c,a){var b=this;if(a&amp;&amp;b.isGrouped()){return b.aggregate(b.getSum,b,true,[c])}else{return b.getSum(b.data.items,c)}},getSum:function(b,e){var d=0,c=0,a=b.length;for(;c&lt;a;++c){d+=b[c].get(e)}return d},count:function(a){var b=this;if(a&amp;&amp;b.isGrouped()){return b.aggregate(function(c){return c.length},b,true)}else{return b.getCount()}},min:function(c,a){var b=this;if(a&amp;&amp;b.isGrouped()){return b.aggregate(b.getMin,b,true,[c])}else{return b.getMin(b.data.items,c)}},getMin:function(b,f){var d=1,a=b.length,e,c;if(a&gt;0){c=b[0].get(f)}for(;d&lt;a;++d){e=b[d].get(f);if(e&lt;c){c=e}}return c},max:function(c,a){var b=this;if(a&amp;&amp;b.isGrouped()){return b.aggregate(b.getMax,b,true,[c])}else{return b.getMax(b.data.items,c)}},getMax:function(c,f){var d=1,b=c.length,e,a;if(b&gt;0){a=c[0].get(f)}for(;d&lt;b;++d){e=c[d].get(f);if(e&gt;a){a=e}}return a},average:function(c,a){var b=this;if(a&amp;&amp;b.isGrouped()){return b.aggregate(b.getAverage,b,true,[c])}else{return b.getAverage(b.data.items,c)}},getAverage:function(b,e){var c=0,a=b.length,d=0;if(b.length&gt;0){for(;c&lt;a;++c){d+=b[c].get(e)}return d/a}return 0},aggregate:function(g,j,e,f){f=f||[];if(e&amp;&amp;this.isGrouped()){var a=this.getGroups(),c=0,d=a.length,b={},h;for(;c&lt;d;++c){h=a[c];b[h.name]=g.apply(j||this,[h.children].concat(f))}return b}else{return g.apply(j||this,[this.data.items].concat(f))}}},function(){Ext.regStore(&quot;ext-empty-store&quot;,{fields:[],proxy:&quot;proxy&quot;})});Ext.define(&quot;Ext.data.ArrayStore&quot;,{extend:&quot;Ext.data.Store&quot;,alias:&quot;store.array&quot;,uses:[&quot;Ext.data.reader.Array&quot;],constructor:function(a){a=a||{};Ext.applyIf(a,{proxy:{type:&quot;memory&quot;,reader:&quot;array&quot;}});this.callParent([a])},loadData:function(e,a){if(this.expandData===true){var d=[],b=0,c=e.length;for(;b&lt;c;b++){d[d.length]=[e[b]]}e=d}this.callParent([e,a])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define(&quot;Ext.draw.Surface&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},requires:[&quot;Ext.draw.CompositeSprite&quot;],uses:[&quot;Ext.draw.engine.Svg&quot;,&quot;Ext.draw.engine.Vml&quot;],separatorRe:/[, ]+/,statics:{create:function(b,d){d=d||[&quot;Svg&quot;,&quot;Vml&quot;];var c=0,a=d.length,e;for(;c&lt;a;c++){if(Ext.supports[d[c]]){return Ext.create(&quot;Ext.draw.engine.&quot;+d[c],b)}}return false}},availableAttrs:{blur:0,&quot;clip-rect&quot;:&quot;0 0 1e9 1e9&quot;,cursor:&quot;default&quot;,cx:0,cy:0,&quot;dominant-baseline&quot;:&quot;auto&quot;,fill:&quot;none&quot;,&quot;fill-opacity&quot;:1,font:'10px &quot;Arial&quot;',&quot;font-family&quot;:'&quot;Arial&quot;',&quot;font-size&quot;:&quot;10&quot;,&quot;font-style&quot;:&quot;normal&quot;,&quot;font-weight&quot;:400,gradient:&quot;&quot;,height:0,hidden:false,href:&quot;http://sencha.com/&quot;,opacity:1,path:&quot;M0,0&quot;,radius:0,rx:0,ry:0,scale:&quot;1 1&quot;,src:&quot;&quot;,stroke:&quot;#000&quot;,&quot;stroke-dasharray&quot;:&quot;&quot;,&quot;stroke-linecap&quot;:&quot;butt&quot;,&quot;stroke-linejoin&quot;:&quot;butt&quot;,&quot;stroke-miterlimit&quot;:0,&quot;stroke-opacity&quot;:1,&quot;stroke-width&quot;:1,target:&quot;_blank&quot;,text:&quot;&quot;,&quot;text-anchor&quot;:&quot;middle&quot;,title:&quot;Ext Draw&quot;,width:0,x:0,y:0,zIndex:0},container:undefined,height:352,width:512,x:0,y:0,orderSpritesByZIndex:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.domRef=Ext.getDoc().dom;b.customAttributes={};b.addEvents(&quot;mousedown&quot;,&quot;mouseup&quot;,&quot;mouseover&quot;,&quot;mouseout&quot;,&quot;mousemove&quot;,&quot;mouseenter&quot;,&quot;mouseleave&quot;,&quot;click&quot;);b.mixins.observable.constructor.call(b);b.getId();b.initGradients();b.initItems();if(b.renderTo){b.render(b.renderTo);delete b.renderTo}b.initBackground(a.background)},initSurface:Ext.emptyFn,renderItem:Ext.emptyFn,renderItems:Ext.emptyFn,setViewBox:function(b,d,c,a){if(isFinite(b)&amp;&amp;isFinite(d)&amp;&amp;isFinite(c)&amp;&amp;isFinite(a)){this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()}},addCls:Ext.emptyFn,removeCls:Ext.emptyFn,setStyle:Ext.emptyFn,initGradients:function(){var a=this.gradients;if(a){Ext.each(a,this.addGradient,this)}},initItems:function(){var a=this.items;this.items=Ext.create(&quot;Ext.draw.CompositeSprite&quot;);this.groups=Ext.create(&quot;Ext.draw.CompositeSprite&quot;);if(a){this.add(a)}},initBackground:function(b){var e=this,d=e.width,a=e.height,f,g,c;if(b){if(b.gradient){g=b.gradient;f=g.id;e.addGradient(g);e.background=e.add({type:&quot;rect&quot;,x:0,y:0,width:d,height:a,fill:&quot;url(#&quot;+f+&quot;)&quot;})}else{if(b.fill){e.background=e.add({type:&quot;rect&quot;,x:0,y:0,width:d,height:a,fill:b.fill})}else{if(b.image){e.background=e.add({type:&quot;image&quot;,x:0,y:0,width:d,height:a,src:b.image})}}}}},setSize:function(a,b){if(this.background){this.background.setAttributes({width:a,height:b,hidden:false},true)}this.applyViewBox()},scrubAttrs:function(d){var c,b={},a={},e=d.attr;for(c in e){if(this.translateAttrs.hasOwnProperty(c)){b[this.translateAttrs[c]]=e[c];a[this.translateAttrs[c]]=true}else{if(this.availableAttrs.hasOwnProperty(c)&amp;&amp;!a[c]){b[c]=e[c]}}}return b},onClick:function(a){this.processEvent(&quot;click&quot;,a)},onMouseUp:function(a){this.processEvent(&quot;mouseup&quot;,a)},onMouseDown:function(a){this.processEvent(&quot;mousedown&quot;,a)},onMouseOver:function(a){this.processEvent(&quot;mouseover&quot;,a)},onMouseOut:function(a){this.processEvent(&quot;mouseout&quot;,a)},onMouseMove:function(a){this.fireEvent(&quot;mousemove&quot;,a)},onMouseEnter:Ext.emptyFn,onMouseLeave:Ext.emptyFn,addGradient:Ext.emptyFn,add:function(){var f=Array.prototype.slice.call(arguments),h,d;var a=f.length&gt;1;if(a||Ext.isArray(f[0])){var g=a?f:f[0],b=[],c,e,j;for(c=0,e=g.length;c&lt;e;c++){j=g[c];j=this.add(j);b.push(j)}return b}h=this.prepareItems(f[0],true)[0];this.insertByZIndex(h);this.onAdd(h);return h},insertByZIndex:function(i){var f=this,d=f.items.items,c=d.length,j=Math.ceil,g=i.attr.zIndex,h=c,b=h-1,e=0,a;if(f.orderSpritesByZIndex&amp;&amp;c&amp;&amp;g&lt;d[b].attr.zIndex){while(e&lt;=b){h=j((e+b)/2);a=d[h].attr.zIndex;if(a&gt;g){b=h-1}else{if(a&lt;g){e=h+1}else{break}}}while(h&lt;c&amp;&amp;d[h].attr.zIndex&lt;=g){h++}}f.items.insert(h,i);return h},onAdd:function(d){var f=d.group,b=d.draggable,a,e,c;if(f){a=[].concat(f);e=a.length;for(c=0;c&lt;e;c++){f=a[c];this.getGroup(f).add(d)}delete d.group}if(b){d.initDraggable()}},remove:function(a,b){if(a){this.items.remove(a);this.groups.each(function(c){c.remove(a)});a.onRemove();if(b===true){a.destroy()}}},removeAll:function(d){var a=this.items.items,c=a.length,b;for(b=c-1;b&gt;-1;b--){this.remove(a[b],d)}},onRemove:Ext.emptyFn,onDestroy:Ext.emptyFn,applyViewBox:function(){var d=this,k=d.viewBox,a=d.width,g=d.height,f,e,i,b,h,c,j;if(k&amp;&amp;(a||g)){f=k.x;e=k.y;i=k.width;b=k.height;h=g/b;c=a/i;if(i*h&lt;a){f-=(a-i*h)/2/h}if(b*c&lt;g){e-=(g-b*c)/2/c}j=1/Math.min(i,h);d.viewBoxShift={dx:-f,dy:-e,scale:j}}},transformToViewBox:function(a,d){if(this.viewBoxShift){var c=this,b=c.viewBoxShift;return[a*b.scale-b.dx,d*b.scale-b.dy]}else{return[a,d]}},applyTransformations:function(b){b.bbox.transform=0;this.transform(b);var d=this,c=false,a=b.attr;if(a.translation.x!=null||a.translation.y!=null){d.translate(b);c=true}if(a.scaling.x!=null||a.scaling.y!=null){d.scale(b);c=true}if(a.rotation.degrees!=null){d.rotate(b);c=true}if(c){b.bbox.transform=0;this.transform(b);b.transformations=[]}},rotate:function(a){var e,b=a.attr.rotation.degrees,d=a.attr.rotation.x,c=a.attr.rotation.y;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(a);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}a.transformations.push({type:&quot;rotate&quot;,degrees:b,x:d,y:c})},translate:function(b){var a=b.attr.translation.x||0,c=b.attr.translation.y||0;b.transformations.push({type:&quot;translate&quot;,x:a,y:c})},scale:function(b){var e,a=b.attr.scaling.x||1,f=b.attr.scaling.y||1,d=b.attr.scaling.centerX,c=b.attr.scaling.centerY;if(!Ext.isNumber(d)||!Ext.isNumber(c)){e=this.getBBox(b);d=!Ext.isNumber(d)?e.x+e.width/2:d;c=!Ext.isNumber(c)?e.y+e.height/2:c}b.transformations.push({type:&quot;scale&quot;,x:a,y:f,centerX:d,centerY:c})},rectPath:function(a,e,b,c,d){if(d){return[[&quot;M&quot;,a+d,e],[&quot;l&quot;,b-d*2,0],[&quot;a&quot;,d,d,0,0,1,d,d],[&quot;l&quot;,0,c-d*2],[&quot;a&quot;,d,d,0,0,1,-d,d],[&quot;l&quot;,d*2-b,0],[&quot;a&quot;,d,d,0,0,1,-d,-d],[&quot;l&quot;,0,d*2-c],[&quot;a&quot;,d,d,0,0,1,d,-d],[&quot;z&quot;]]}return[[&quot;M&quot;,a,e],[&quot;l&quot;,b,0],[&quot;l&quot;,0,c],[&quot;l&quot;,-b,0],[&quot;z&quot;]]},ellipsePath:function(a,d,c,b){if(b==null){b=c}return[[&quot;M&quot;,a,d],[&quot;m&quot;,0,-b],[&quot;a&quot;,c,b,0,1,1,0,2*b],[&quot;a&quot;,c,b,0,1,1,0,-2*b],[&quot;z&quot;]]},getPathpath:function(a){return a.attr.path},getPathcircle:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radius,b.radius)},getPathellipse:function(c){var b=c.attr;return this.ellipsePath(b.x,b.y,b.radiusX||(b.width/2)||0,b.radiusY||(b.height/2)||0)},getPathrect:function(c){var b=c.attr;return this.rectPath(b.x,b.y,b.width,b.height,b.r)},getPathimage:function(c){var b=c.attr;return this.rectPath(b.x||0,b.y||0,b.width,b.height)},getPathtext:function(a){var b=this.getBBoxText(a);return this.rectPath(b.x,b.y,b.width,b.height)},createGroup:function(b){var a=this.groups.get(b);if(!a){a=Ext.create(&quot;Ext.draw.CompositeSprite&quot;,{surface:this});a.id=b||Ext.id(null,&quot;ext-surface-group-&quot;);this.groups.add(a)}return a},getGroup:function(b){if(typeof b==&quot;string&quot;){var a=this.groups.get(b);if(!a){a=this.createGroup(b)}}else{a=b}return a},prepareItems:function(a,c){a=[].concat(a);var e,b,d;for(b=0,d=a.length;b&lt;d;b++){e=a[b];if(!(e instanceof Ext.draw.Sprite)){e.surface=this;a[b]=this.createItem(e)}else{e.surface=this}}return a},setText:Ext.emptyFn,createItem:Ext.emptyFn,getId:function(){return this.id||(this.id=Ext.id(null,&quot;ext-surface-&quot;))},destroy:function(){delete this.domRef;this.removeAll()}});Ext.define(&quot;Ext.draw.Component&quot;,{alias:&quot;widget.draw&quot;,extend:&quot;Ext.Component&quot;,requires:[&quot;Ext.draw.Surface&quot;,&quot;Ext.layout.component.Draw&quot;],enginePriority:[&quot;Svg&quot;,&quot;Vml&quot;],baseCls:Ext.baseCSSPrefix+&quot;surface&quot;,componentLayout:&quot;draw&quot;,viewBox:true,autoSize:false,initComponent:function(){this.callParent(arguments);this.addEvents(&quot;mousedown&quot;,&quot;mouseup&quot;,&quot;mousemove&quot;,&quot;mouseenter&quot;,&quot;mouseleave&quot;,&quot;click&quot;)},onRender:function(){var d=this,i=d.viewBox,b=d.autoSize,g,c,a,h,f,e;d.callParent(arguments);if(d.createSurface()!==false){c=d.surface.items;if(i||b){g=c.getBBox();a=g.width;h=g.height;f=g.x;e=g.y;if(d.viewBox){d.surface.setViewBox(f,e,a,h)}else{d.autoSizeSurface()}}}},autoSizeSurface:function(){var d=this,b=d.surface.items,e=b.getBBox(),c=e.width,a=e.height;b.setAttributes({translate:{x:-e.x,y:-e.y+(+Ext.isOpera)}},true);if(d.rendered){d.setSize(c,a);d.surface.setSize(c,a)}else{d.surface.setSize(c,a)}d.el.setSize(c,a)},createSurface:function(){var a=Ext.draw.Surface.create(Ext.apply({},{width:this.width,height:this.height,renderTo:this.el},this.initialConfig));if(!a){return false}this.surface=a;function b(c){return function(d){this.fireEvent(c,d)}}a.on({scope:this,mouseup:b(&quot;mouseup&quot;),mousedown:b(&quot;mousedown&quot;),mousemove:b(&quot;mousemove&quot;),mouseenter:b(&quot;mouseenter&quot;),mouseleave:b(&quot;mouseleave&quot;),click:b(&quot;click&quot;)})},onDestroy:function(){var a=this.surface;if(a){a.destroy()}this.callParent(arguments)}});Ext.define(&quot;Ext.layout.container.Fit&quot;,{extend:&quot;Ext.layout.container.AbstractFit&quot;,alias:&quot;layout.fit&quot;,alternateClassName:&quot;Ext.layout.FitLayout&quot;,requires:[&quot;Ext.layout.container.Box&quot;],defaultMargins:{top:0,right:0,bottom:0,left:0},onLayout:function(){var c=this,a,b,d;c.callParent();if(c.owner.items.length){b=c.owner.items.get(0);d=b.margins||c.defaultMargins;a=c.getLayoutTargetSize();a.width-=d.width;a.height-=d.height;c.setItemBox(b,a);if(d.left||d.top){b.setPosition(d.left,d.top)}}},getTargetBox:function(){return this.getLayoutTargetSize()},setItemBox:function(c,b){var a=this;if(c&amp;&amp;b.height&gt;0){if(!a.owner.isFixedWidth()){b.width=undefined}if(!a.owner.isFixedHeight()){b.height=undefined}a.setItemSize(c,b.width,b.height)}},configureItem:function(a){a.layoutManagedHeight=0;a.layoutManagedWidth=0;this.callParent(arguments)}},function(){this.prototype.renderItem=Ext.layout.container.Box.prototype.renderItem});Ext.define(&quot;Ext.menu.CheckItem&quot;,{extend:&quot;Ext.menu.Item&quot;,alias:&quot;widget.menucheckitem&quot;,checkedCls:Ext.baseCSSPrefix+&quot;menu-item-checked&quot;,uncheckedCls:Ext.baseCSSPrefix+&quot;menu-item-unchecked&quot;,groupCls:Ext.baseCSSPrefix+&quot;menu-group-icon&quot;,hideOnClick:false,afterRender:function(){var a=this;this.callParent();a.checked=!a.checked;a.setChecked(!a.checked,true)},initComponent:function(){var a=this;a.addEvents(&quot;beforecheckchange&quot;,&quot;checkchange&quot;);a.callParent(arguments);Ext.menu.Manager.registerCheckable(a);if(a.group){if(!a.iconCls){a.iconCls=a.groupCls}if(a.initialConfig.hideOnClick!==false){a.hideOnClick=true}}},disableCheckChange:function(){var a=this;if(a.iconEl){a.iconEl.addCls(a.disabledCls)}a.checkChangeDisabled=true},enableCheckChange:function(){var a=this;a.iconEl.removeCls(a.disabledCls);a.checkChangeDisabled=false},onClick:function(b){var a=this;if(!a.disabled&amp;&amp;!a.checkChangeDisabled&amp;&amp;!(a.checked&amp;&amp;a.group)){a.setChecked(!a.checked)}this.callParent([b])},onDestroy:function(){Ext.menu.Manager.unregisterCheckable(this);this.callParent(arguments)},setChecked:function(c,a){var b=this;if(b.checked!==c&amp;&amp;(a||b.fireEvent(&quot;beforecheckchange&quot;,b,c)!==false)){if(b.el){b.el[c?&quot;addCls&quot;:&quot;removeCls&quot;](b.checkedCls)[!c?&quot;addCls&quot;:&quot;removeCls&quot;](b.uncheckedCls)}b.checked=c;Ext.menu.Manager.onCheckChange(b,c);if(!a){Ext.callback(b.checkHandler,b.scope,[b,c]);b.fireEvent(&quot;checkchange&quot;,b,c)}}}});Ext.define(&quot;Ext.menu.Menu&quot;,{extend:&quot;Ext.panel.Panel&quot;,alias:&quot;widget.menu&quot;,requires:[&quot;Ext.layout.container.Fit&quot;,&quot;Ext.layout.container.VBox&quot;,&quot;Ext.menu.CheckItem&quot;,&quot;Ext.menu.Item&quot;,&quot;Ext.menu.KeyNav&quot;,&quot;Ext.menu.Manager&quot;,&quot;Ext.menu.Separator&quot;],allowOtherMenus:false,ariaRole:&quot;menu&quot;,defaultAlign:&quot;tl-bl?&quot;,floating:true,constrain:true,hidden:true,hideMode:&quot;visibility&quot;,ignoreParentClicks:false,isMenu:true,showSeparator:true,minWidth:120,initComponent:function(){var b=this,d=Ext.baseCSSPrefix,a=[d+&quot;menu&quot;],c=b.bodyCls?[b.bodyCls]:[];b.addEvents(&quot;click&quot;,&quot;mouseenter&quot;,&quot;mouseleave&quot;,&quot;mouseover&quot;);Ext.menu.Manager.register(b);if(b.plain){a.push(d+&quot;menu-plain&quot;)}b.cls=a.join(&quot; &quot;);c.unshift(d+&quot;menu-body&quot;);b.bodyCls=c.join(&quot; &quot;);b.layout={type:&quot;vbox&quot;,align:&quot;stretchmax&quot;,autoSize:true,clearInnerCtOnLayout:true,overflowHandler:&quot;Scroller&quot;};if(b.floating===false&amp;&amp;b.initialConfig.hidden!==true){b.hidden=false}b.callParent(arguments);b.on(&quot;beforeshow&quot;,function(){var e=!!b.items.length;if(e&amp;&amp;b.rendered){b.el.setStyle(&quot;visibility&quot;,null)}return e})},afterRender:function(a){var b=this,d=Ext.baseCSSPrefix,c=&quot;&amp;#160;&quot;;b.callParent(arguments);if(b.showSeparator){b.iconSepEl=b.layout.getRenderTarget().insertFirst({cls:d+&quot;menu-icon-separator&quot;,html:c})}b.focusEl=b.el.createChild({cls:d+&quot;menu-focus&quot;,tabIndex:&quot;-1&quot;,html:c});b.mon(b.el,{click:b.onClick,mouseover:b.onMouseOver,scope:b});b.mouseMonitor=b.el.monitorMouseLeave(100,b.onMouseLeave,b);if(b.showSeparator&amp;&amp;((!Ext.isStrict&amp;&amp;Ext.isIE)||Ext.isIE6)){b.iconSepEl.setHeight(b.el.getHeight())}b.keyNav=Ext.create(&quot;Ext.menu.KeyNav&quot;,b)},afterLayout:function(){var j=this;j.callParent(arguments);if((!Ext.isStrict&amp;&amp;Ext.isIE)||Ext.isIE6){var a=j.layout.getRenderTarget(),c=0,b=j.dockedItems,d=b.length,f=0,g,h,e;c=a.getWidth();e=c+j.body.getBorderWidth(&quot;lr&quot;)+j.body.getPadding(&quot;lr&quot;);j.body.setWidth(e);for(;f&lt;d,g=b.getAt(f);f++){if(g.dock==&quot;left&quot;||g.dock==&quot;right&quot;){e+=g.getWidth()}}j.el.setWidth(e)}},getBubbleTarget:function(){return this.parentMenu||this.callParent()},canActivateItem:function(a){return a&amp;&amp;!a.isDisabled()&amp;&amp;a.isVisible()&amp;&amp;(a.canActivate||a.getXTypes().indexOf(&quot;menuitem&quot;)&lt;0)},deactivateActiveItem:function(){var a=this;if(a.activeItem){a.activeItem.deactivate();if(!a.activeItem.activated){delete a.activeItem}}if(a.focusedItem&amp;&amp;!a.filtered){a.focusedItem.blur();if(!a.focusedItem.$focused){delete a.focusedItem}}},clearStretch:function(){if(this.rendered){this.items.each(function(a){if(a.componentLayout){delete a.componentLayout.lastComponentSize}if(a.el){a.el.setWidth(null)}})}},onAdd:function(){var a=this;a.clearStretch();a.callParent(arguments);if(Ext.isIE6||Ext.isIE7){Ext.Function.defer(a.doComponentLayout,10,a)}},onRemove:function(){this.clearStretch();this.callParent(arguments)},redoComponentLayout:function(){if(this.rendered){this.clearStretch();this.doComponentLayout()}},getFocusEl:function(){return this.focusEl},hide:function(){this.deactivateActiveItem();this.callParent(arguments)},getItemFromEvent:function(a){return this.getChildByElement(a.getTarget())},lookupComponent:function(b){var a=this;if(Ext.isString(b)){b=a.lookupItemFromString(b)}else{if(Ext.isObject(b)){b=a.lookupItemFromObject(b)}}b.minWidth=b.minWidth||a.minWidth;return b},lookupItemFromObject:function(c){var b=this,d=Ext.baseCSSPrefix,a,e;if(!c.isComponent){if(!c.xtype){c=Ext.create(&quot;Ext.menu.&quot;+(Ext.isBoolean(c.checked)?&quot;Check&quot;:&quot;&quot;)+&quot;Item&quot;,c)}else{c=Ext.ComponentManager.create(c,c.xtype)}}if(c.isMenuItem){c.parentMenu=b}if(!c.isMenuItem&amp;&amp;!c.dock){a=[d+&quot;menu-item&quot;,d+&quot;menu-item-cmp&quot;];e=Ext.Function.createInterceptor;c.focus=e(c.focus,function(){this.$focused=true},c);c.blur=e(c.blur,function(){this.$focused=false},c);if(!b.plain&amp;&amp;(c.indent===true||c.iconCls===&quot;no-icon&quot;)){a.push(d+&quot;menu-item-indent&quot;)}if(c.rendered){c.el.addCls(a)}else{c.cls=(c.cls?c.cls:&quot;&quot;)+&quot; &quot;+a.join(&quot; &quot;)}c.isMenuItem=true}return c},lookupItemFromString:function(a){return(a==&quot;separator&quot;||a==&quot;-&quot;)?Ext.createWidget(&quot;menuseparator&quot;):Ext.createWidget(&quot;menuitem&quot;,{canActivate:false,hideOnClick:false,plain:true,text:a})},onClick:function(c){var b=this,a;if(b.disabled){c.stopEvent();return}if((c.getTarget()==b.focusEl.dom)||c.within(b.layout.getRenderTarget())){a=b.getItemFromEvent(c)||b.activeItem;if(a){if(a.getXTypes().indexOf(&quot;menuitem&quot;)&gt;=0){if(!a.menu||!b.ignoreParentClicks){a.onClick(c)}else{c.stopEvent()}}}b.fireEvent(&quot;click&quot;,b,a,c)}},onDestroy:function(){var a=this;Ext.menu.Manager.unregister(a);if(a.rendered){a.el.un(a.mouseMonitor);a.keyNav.destroy();delete a.keyNav}a.callParent(arguments)},onMouseLeave:function(b){var a=this;a.deactivateActiveItem();if(a.disabled){return}a.fireEvent(&quot;mouseleave&quot;,a,b)},onMouseOver:function(d){var c=this,f=d.getRelatedTarget(),a=!c.el.contains(f),b=c.getItemFromEvent(d);if(a&amp;&amp;c.parentMenu){c.parentMenu.setActiveItem(c.parentItem);c.parentMenu.mouseMonitor.mouseenter()}if(c.disabled){return}if(b){c.setActiveItem(b);if(b.activated&amp;&amp;b.expandMenu){b.expandMenu()}}if(a){c.fireEvent(&quot;mouseenter&quot;,c,d)}c.fireEvent(&quot;mouseover&quot;,c,b,d)},setActiveItem:function(b){var a=this;if(b&amp;&amp;(b!=a.activeItem&amp;&amp;b!=a.focusedItem)){a.deactivateActiveItem();if(a.canActivateItem(b)){if(b.activate){b.activate();if(b.activated){a.activeItem=b;a.focusedItem=b;a.focus()}}else{b.focus();a.focusedItem=b}}b.el.scrollIntoView(a.layout.getRenderTarget())}},showBy:function(b,f,e){var a=this,d,c;if(a.floating&amp;&amp;b){a.layout.autoSize=true;a.doAutoRender();delete a.needsLayout;b=b.el||b;d=a.el.getAlignToXY(b,f||a.defaultAlign,e);if(a.floatParent){c=a.floatParent.getTargetEl().getViewRegion();d[0]-=c.x;d[1]-=c.y}a.showAt(d)}return a},doConstrain:function(){var f=this,g=f.el.getY(),h,e,b,i=g,j,d,a,c;delete f.height;f.setSize();e=f.getHeight();if(f.floating){d=Ext.fly(f.el.getScopeParent());a=d.getScroll().top;c=d.getViewSize().height;j=g-a;h=f.maxHeight?f.maxHeight:c-j;if(e&gt;c){h=c;i=g-j}else{if(h&lt;e){i=g-(e-h);h=e}}}else{h=f.getHeight()}if(f.maxHeight){h=Math.min(f.maxHeight,h)}if(e&gt;h&amp;&amp;h&gt;0){f.layout.autoSize=false;f.setHeight(h);if(f.showSeparator){f.iconSepEl.setHeight(f.layout.getRenderTarget().dom.scrollHeight)}}b=f.getConstrainVector(f.el.getScopeParent());if(b){f.setPosition(f.getPosition()[0]+b[0])}f.el.setY(i)}});Ext.define(&quot;Ext.resizer.ResizeTracker&quot;,{extend:&quot;Ext.dd.DragTracker&quot;,dynamic:true,preserveRatio:false,constrainTo:null,proxyCls:Ext.baseCSSPrefix+&quot;resizable-proxy&quot;,constructor:function(b){var d=this;if(!b.el){if(b.target.isComponent){d.el=b.target.getEl()}else{d.el=b.target}}this.callParent(arguments);if(d.preserveRatio&amp;&amp;d.minWidth&amp;&amp;d.minHeight){var c=d.minWidth/d.el.getWidth(),a=d.minHeight/d.el.getHeight();if(a&gt;c){d.minWidth=d.el.getWidth()*a}else{d.minHeight=d.el.getHeight()*c}}if(d.throttle){var e=Ext.Function.createThrottled(function(){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)},d.throttle);d.resize=function(g,h,f){if(f){Ext.resizer.ResizeTracker.prototype.resize.apply(d,arguments)}else{e.apply(null,arguments)}}}},onBeforeStart:function(a){this.startBox=this.el.getBox()},getDynamicTarget:function(){var a=this,b=a.target;if(a.dynamic){return b}else{if(!a.proxy){a.proxy=a.createProxy(b)}}a.proxy.show();return a.proxy},createProxy:function(c){var b,a=this.proxyCls,d;if(c.isComponent){b=c.getProxy().addCls(a)}else{d=Ext.getBody();if(Ext.scopeResetCSS){d=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+&quot;reset&quot;})}b=c.createProxy({tag:&quot;div&quot;,cls:a,id:c.id+&quot;-rzproxy&quot;},d)}b.removeCls(Ext.baseCSSPrefix+&quot;proxy-el&quot;);return b},onStart:function(a){this.activeResizeHandle=Ext.getCmp(this.getDragTarget().id);if(!this.dynamic){this.resize(this.startBox,{horizontal:&quot;none&quot;,vertical:&quot;none&quot;})}},onDrag:function(a){if(this.dynamic||this.proxy){this.updateDimensions(a)}},updateDimensions:function(r,l){var s=this,c=s.activeResizeHandle.region,f=s.getOffset(s.constrainTo?&quot;dragTarget&quot;:null),j=s.startBox,g,o=0,t=0,i,p,a=0,v=0,u,m=f[0]&lt;0?&quot;right&quot;:&quot;left&quot;,q=f[1]&lt;0?&quot;down&quot;:&quot;up&quot;,h,b;switch(c){case&quot;south&quot;:t=f[1];b=2;break;case&quot;north&quot;:t=-f[1];v=-t;b=2;break;case&quot;east&quot;:o=f[0];b=1;break;case&quot;west&quot;:o=-f[0];a=-o;b=1;break;case&quot;northeast&quot;:t=-f[1];v=-t;o=f[0];h=[j.x,j.y+j.height];b=3;break;case&quot;southeast&quot;:t=f[1];o=f[0];h=[j.x,j.y];b=3;break;case&quot;southwest&quot;:o=-f[0];a=-o;t=f[1];h=[j.x+j.width,j.y];b=3;break;case&quot;northwest&quot;:t=-f[1];v=-t;o=-f[0];a=-o;h=[j.x+j.width,j.y+j.height];b=3;break}var d={width:j.width+o,height:j.height+t,x:j.x+a,y:j.y+v};i=Ext.Number.snap(d.width,s.widthIncrement);p=Ext.Number.snap(d.height,s.heightIncrement);if(i!=d.width||p!=d.height){switch(c){case&quot;northeast&quot;:d.y-=p-d.height;break;case&quot;north&quot;:d.y-=p-d.height;break;case&quot;southwest&quot;:d.x-=i-d.width;break;case&quot;west&quot;:d.x-=i-d.width;break;case&quot;northwest&quot;:d.x-=i-d.width;d.y-=p-d.height}d.width=i;d.height=p}if(d.width&lt;s.minWidth||d.width&gt;s.maxWidth){d.width=Ext.Number.constrain(d.width,s.minWidth,s.maxWidth);if(a){d.x=j.x+(j.width-d.width)}}else{s.lastX=d.x}if(d.height&lt;s.minHeight||d.height&gt;s.maxHeight){d.height=Ext.Number.constrain(d.height,s.minHeight,s.maxHeight);if(v){d.y=j.y+(j.height-d.height)}}else{s.lastY=d.y}if(s.preserveRatio||r.shiftKey){var n,k;g=s.startBox.width/s.startBox.height;n=Math.min(Math.max(s.minHeight,d.width/g),s.maxHeight);k=Math.min(Math.max(s.minWidth,d.height*g),s.maxWidth);if(b==1){d.height=n}else{if(b==2){d.width=k}else{u=Math.abs(h[0]-this.lastXY[0])/Math.abs(h[1]-this.lastXY[1]);if(u&gt;g){d.height=n}else{d.width=k}if(c==&quot;northeast&quot;){d.y=j.y-(d.height-j.height)}else{if(c==&quot;northwest&quot;){d.y=j.y-(d.height-j.height);d.x=j.x-(d.width-j.width)}else{if(c==&quot;southwest&quot;){d.x=j.x-(d.width-j.width)}}}}}}if(t===0){q=&quot;none&quot;}if(o===0){m=&quot;none&quot;}s.resize(d,{horizontal:m,vertical:q},l)},getResizeTarget:function(a){return a?this.target:this.getDynamicTarget()},resize:function(b,d,a){var c=this.getResizeTarget(a);if(c.isComponent){if(c.floating){c.setPagePosition(b.x,b.y)}c.setSize(b.width,b.height)}else{c.setBox(b);if(this.originalTarget){this.originalTarget.setBox(b)}}},onEnd:function(a){this.updateDimensions(a,true);if(this.proxy){this.proxy.hide()}}});Ext.define(&quot;Ext.data.reader.Array&quot;,{extend:&quot;Ext.data.reader.Json&quot;,alternateClassName:&quot;Ext.data.ArrayReader&quot;,alias:&quot;reader.array&quot;,buildExtractors:function(){this.callParent(arguments);var a=this.model.prototype.fields.items,b=0,c=a.length,e=[],d;for(;b&lt;c;b++){d=a[b].mapping;e.push(function(f){return function(g){return g[f]}}(d!==null?d:b))}this.extractorFunctions=e}});Ext.define(&quot;Ext.ShadowPool&quot;,{singleton:true,requires:[&quot;Ext.DomHelper&quot;],markup:function(){if(Ext.supports.CSS3BoxShadow){return'&lt;div class=&quot;'+Ext.baseCSSPrefix+'css-shadow&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;'}else{if(Ext.isIE){return'&lt;div class=&quot;'+Ext.baseCSSPrefix+'ie-shadow&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;'}else{return'&lt;div class=&quot;'+Ext.baseCSSPrefix+'frame-shadow&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;xst&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;xstl&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;&lt;div class=&quot;xstc&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;&lt;div class=&quot;xstr&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;xsc&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;xsml&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;&lt;div class=&quot;xsmc&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;&lt;div class=&quot;xsmr&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;xsb&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;xsbl&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;&lt;div class=&quot;xsbc&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;&lt;div class=&quot;xsbr&quot; role=&quot;presentation&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'}}}(),shadows:[],pull:function(){var a=this.shadows.shift();if(!a){a=Ext.get(Ext.DomHelper.insertHtml(&quot;beforeBegin&quot;,document.body.firstChild,this.markup));a.autoBoxAdjust=false}return a},push:function(a){this.shadows.push(a)},reset:function(){Ext.Array.each(this.shadows,function(a){a.remove()});this.shadows=[]}});Ext.define(&quot;Ext.data.proxy.Client&quot;,{extend:&quot;Ext.data.proxy.Proxy&quot;,alternateClassName:&quot;Ext.data.ClientProxy&quot;,clear:function(){}});Ext.define(&quot;Ext.draw.Matrix&quot;,{requires:[&quot;Ext.draw.Draw&quot;],constructor:function(h,g,l,k,j,i){if(h!=null){this.matrix=[[h,l,j],[g,k,i],[0,0,1]]}else{this.matrix=[[1,0,0],[0,1,0],[0,0,1]]}},add:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q&lt;3;q++){for(o=0;o&lt;3;o++){j=0;for(l=0;l&lt;3;l++){j+=n.matrix[q][l]*r[l][o]}g[q][o]=j}}n.matrix=g},prepend:function(s,p,m,k,i,h){var n=this,g=[[],[],[]],r=[[s,m,i],[p,k,h],[0,0,1]],q,o,l,j;for(q=0;q&lt;3;q++){for(o=0;o&lt;3;o++){j=0;for(l=0;l&lt;3;l++){j+=r[q][l]*n.matrix[l][o]}g[q][o]=j}}n.matrix=g},invert:function(){var j=this.matrix,i=j[0][0],h=j[1][0],n=j[0][1],m=j[1][1],l=j[0][2],k=j[1][2],g=i*m-h*n;return new Ext.draw.Matrix(m/g,-h/g,-n/g,i/g,(n*k-m*l)/g,(h*l-i*k)/g)},clone:function(){var i=this.matrix,h=i[0][0],g=i[1][0],m=i[0][1],l=i[1][1],k=i[0][2],j=i[1][2];return new Ext.draw.Matrix(h,g,m,l,k,j)},translate:function(a,b){this.prepend(1,0,0,1,a,b)},scale:function(b,e,a,d){var c=this;if(e==null){e=b}c.add(1,0,0,1,a,d);c.add(b,0,0,e,0,0);c.add(1,0,0,1,-a,-d)},rotate:function(c,b,g){c=Ext.draw.Draw.rad(c);var e=this,f=+Math.cos(c).toFixed(9),d=+Math.sin(c).toFixed(9);e.add(f,d,-d,f,b,g);e.add(1,0,0,1,-b,-g)},x:function(a,c){var b=this.matrix;return a*b[0][0]+c*b[0][1]+b[0][2]},y:function(a,c){var b=this.matrix;return a*b[1][0]+c*b[1][1]+b[1][2]},get:function(b,a){return +this.matrix[b][a].toFixed(4)},toString:function(){var a=this;return[a.get(0,0),a.get(0,1),a.get(1,0),a.get(1,1),0,0].join()},toSvg:function(){var a=this;return&quot;matrix(&quot;+[a.get(0,0),a.get(1,0),a.get(0,1),a.get(1,1),a.get(0,2),a.get(1,2)].join()+&quot;)&quot;},toFilter:function(){var a=this;return&quot;progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand',FilterType=bilinear,M11=&quot;+a.get(0,0)+&quot;, M12=&quot;+a.get(0,1)+&quot;, M21=&quot;+a.get(1,0)+&quot;, M22=&quot;+a.get(1,1)+&quot;, Dx=&quot;+a.get(0,2)+&quot;, Dy=&quot;+a.get(1,2)+&quot;)&quot;},offset:function(){var a=this.matrix;return[(a[0][2]||0).toFixed(4),(a[1][2]||0).toFixed(4)]},split:function(){function d(f){return f[0]*f[0]+f[1]*f[1]}function b(f){var g=Math.sqrt(d(f));f[0]/=g;f[1]/=g}var a=this.matrix,c={translateX:a[0][2],translateY:a[1][2]},e;e=[[a[0][0],a[0][1]],[a[1][0],a[1][1]]];c.scaleX=Math.sqrt(d(e[0]));b(e[0]);c.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1];e[1]=[e[1][0]-e[0][0]*c.shear,e[1][1]-e[0][1]*c.shear];c.scaleY=Math.sqrt(d(e[1]));b(e[1]);c.shear/=c.scaleY;c.rotate=Math.asin(-e[0][1]);c.isSimple=!+c.shear.toFixed(9)&amp;&amp;(c.scaleX.toFixed(9)==c.scaleY.toFixed(9)||!c.rotate);return c}});Ext.define(&quot;Ext.draw.SpriteDD&quot;,{extend:&quot;Ext.dd.DragSource&quot;,constructor:function(b,a){var d=this,c=b.el;d.sprite=b;d.el=c;d.dragData={el:c,sprite:b};d.callParent([c,a]);d.sprite.setStyle(&quot;cursor&quot;,&quot;move&quot;)},showFrame:Ext.emptyFn,createFrame:Ext.emptyFn,getDragEl:function(a){return this.el},getRegion:function(){var i=this,f=i.el,k,d,c,n,m,q,a,j,g,p,o;o=i.sprite;p=o.getBBox();try{k=Ext.Element.getXY(f)}catch(h){}if(!k){return null}d=k[0];c=d+p.width;n=k[1];m=n+p.height;return Ext.create(&quot;Ext.util.Region&quot;,n,c,m,d)},startDrag:function(b,d){var c=this,a=c.sprite.attr;c.prev=c.sprite.surface.transformToViewBox(b,d)},onDrag:function(h){var g=h.getXY(),f=this,d=f.sprite,a=d.attr,c,b;g=f.sprite.surface.transformToViewBox(g[0],g[1]);c=g[0]-f.prev[0];b=g[1]-f.prev[1];d.setAttributes({translate:{x:a.translation.x+c,y:a.translation.y+b}},true);f.prev=g},setDragElPos:function(){return false}});Ext.define(&quot;Ext.Shadow&quot;,{requires:[&quot;Ext.ShadowPool&quot;],constructor:function(b){var c=this,d={h:0},e,a;Ext.apply(c,b);if(!Ext.isString(c.mode)){c.mode=c.defaultMode}e=c.offset;a=Math.floor(e/2);c.opacity=50;switch(c.mode.toLowerCase()){case&quot;drop&quot;:if(Ext.supports.CSS3BoxShadow){d.w=d.h=-e;d.l=d.t=e}else{d.w=0;d.l=d.t=e;d.t-=1;if(Ext.isIE){d.l-=e+a;d.t-=e+a;d.w-=a;d.h-=a;d.t+=1}}break;case&quot;sides&quot;:if(Ext.supports.CSS3BoxShadow){d.h-=e;d.t=e;d.l=d.w=0}else{d.w=(e*2);d.l=-e;d.t=e-1;if(Ext.isIE){d.l-=(e-a);d.t-=e+a;d.l+=1;d.w-=(e-a)*2;d.w-=a+1;d.h-=1}}break;case&quot;frame&quot;:if(Ext.supports.CSS3BoxShadow){d.l=d.w=d.t=0}else{d.w=d.h=(e*2);d.l=d.t=-e;d.t+=1;d.h-=2;if(Ext.isIE){d.l-=(e-a);d.t-=(e-a);d.l+=1;d.w-=(e+a+1);d.h-=(e+a);d.h+=1}break}}c.adjusts=d},offset:4,defaultMode:&quot;drop&quot;,show:function(c){var b=this,a;c=Ext.get(c);if(!b.el){b.el=Ext.ShadowPool.pull();if(b.el.dom.nextSibling!=c.dom){b.el.insertBefore(c)}}a=(parseInt(c.getStyle(&quot;z-index&quot;),10)-1)||0;b.el.setStyle(&quot;z-index&quot;,b.zIndex||a);if(Ext.isIE&amp;&amp;!Ext.supports.CSS3BoxShadow){b.el.dom.style.filter=&quot;progid:DXImageTransform.Microsoft.alpha(opacity=&quot;+b.opacity+&quot;) progid:DXImageTransform.Microsoft.Blur(pixelradius=&quot;+(b.offset)+&quot;)&quot;}b.realign(c.getLeft(true),c.getTop(true),c.dom.offsetWidth,c.dom.offsetHeight);b.el.dom.style.display=&quot;block&quot;},isVisible:function(){return this.el?true:false},realign:function(b,o,k,g){if(!this.el){return}var a=this.adjusts,i=this.el.dom,j=i.style,c,f,m,e,h,n;j.left=(b+a.l)+&quot;px&quot;;j.top=(o+a.t)+&quot;px&quot;;c=Math.max(k+a.w,0);f=Math.max(g+a.h,0);h=c+&quot;px&quot;;n=f+&quot;px&quot;;if(j.width!=h||j.height!=n){j.width=h;j.height=n;if(Ext.supports.CSS3BoxShadow){j.boxShadow=&quot;0 0 &quot;+this.offset+&quot;px 0 #888&quot;}else{if(!Ext.isIE){m=i.childNodes;e=Math.max(0,(c-12))+&quot;px&quot;;m[0].childNodes[1].style.width=e;m[1].childNodes[1].style.width=e;m[2].childNodes[1].style.width=e;m[1].style.height=Math.max(0,(f-12))+&quot;px&quot;}}}},hide:function(){var a=this;if(a.el){a.el.dom.style.display=&quot;none&quot;;Ext.ShadowPool.push(a.el);delete a.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle(&quot;z-index&quot;,a)}},setOpacity:function(a){if(this.el){if(Ext.isIE&amp;&amp;!Ext.supports.CSS3BoxShadow){a=Math.floor(a*100/2)/100}this.opacity=a;this.el.setOpacity(a)}}});Ext.define(&quot;Ext.data.proxy.Memory&quot;,{extend:&quot;Ext.data.proxy.Client&quot;,alias:&quot;proxy.memory&quot;,alternateClassName:&quot;Ext.data.MemoryProxy&quot;,constructor:function(a){this.callParent([a]);this.setReader(this.reader)},read:function(c,f,d){var e=this,b=e.getReader(),a=b.read(e.data);Ext.apply(c,{resultSet:a});c.setCompleted();c.setSuccessful();Ext.callback(f,d||e,[c])},clear:Ext.emptyFn});Ext.define(&quot;Ext.draw.Sprite&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;,animate:&quot;Ext.util.Animate&quot;},requires:[&quot;Ext.draw.SpriteDD&quot;],dirty:false,dirtyHidden:false,dirtyTransform:false,dirtyPath:true,dirtyFont:true,zIndexDirty:true,isSprite:true,zIndex:0,fontProperties:[&quot;font&quot;,&quot;font-size&quot;,&quot;font-weight&quot;,&quot;font-style&quot;,&quot;font-family&quot;,&quot;text-anchor&quot;,&quot;text&quot;],pathProperties:[&quot;x&quot;,&quot;y&quot;,&quot;d&quot;,&quot;path&quot;,&quot;height&quot;,&quot;width&quot;,&quot;radius&quot;,&quot;r&quot;,&quot;rx&quot;,&quot;ry&quot;,&quot;cx&quot;,&quot;cy&quot;],constructor:function(a){var b=this;a=a||{};b.id=Ext.id(null,&quot;ext-sprite-&quot;);b.transformations=[];Ext.copyTo(this,a,&quot;surface,group,type,draggable&quot;);b.bbox={};b.attr={zIndex:0,translation:{x:null,y:null},rotation:{degrees:null,x:null,y:null},scaling:{x:null,y:null,cx:null,cy:null}};delete a.surface;delete a.group;delete a.type;delete a.draggable;b.setAttributes(a);b.addEvents(&quot;beforedestroy&quot;,&quot;destroy&quot;,&quot;render&quot;,&quot;mousedown&quot;,&quot;mouseup&quot;,&quot;mouseover&quot;,&quot;mouseout&quot;,&quot;mousemove&quot;,&quot;click&quot;);b.mixins.observable.constructor.apply(this,arguments)},initDraggable:function(){var a=this;a.draggable=true;if(!a.el){a.surface.createSpriteElement(a)}a.dd=Ext.create(&quot;Ext.draw.SpriteDD&quot;,a,Ext.isBoolean(a.draggable)?null:a.draggable);a.on(&quot;beforedestroy&quot;,a.dd.destroy,a.dd)},setAttributes:function(j,m){var r=this,h=r.fontProperties,p=h.length,f=r.pathProperties,e=f.length,q=!!r.surface,a=q&amp;&amp;r.surface.customAttributes||{},b=r.attr,k,n,g,c,o,l,s,d;j=Ext.apply({},j);for(k in a){if(j.hasOwnProperty(k)&amp;&amp;typeof a[k]==&quot;function&quot;){Ext.apply(j,a[k].apply(r,[].concat(j[k])))}}if(!!j.hidden!==!!b.hidden){r.dirtyHidden=true}for(n=0;n&lt;e;n++){k=f[n];if(k in j&amp;&amp;j[k]!==b[k]){r.dirtyPath=true;break}}if(&quot;zIndex&quot; in j){r.zIndexDirty=true}for(n=0;n&lt;p;n++){k=h[n];if(k in j&amp;&amp;j[k]!==b[k]){r.dirtyFont=true;break}}g=j.translate;c=b.translation;if(g){if((g.x&amp;&amp;g.x!==c.x)||(g.y&amp;&amp;g.y!==c.y)){Ext.apply(c,g);r.dirtyTransform=true}delete j.translate}o=j.rotate;l=b.rotation;if(o){if((o.x&amp;&amp;o.x!==l.x)||(o.y&amp;&amp;o.y!==l.y)||(o.degrees&amp;&amp;o.degrees!==l.degrees)){Ext.apply(l,o);r.dirtyTransform=true}delete j.rotate}s=j.scale;d=b.scaling;if(s){if((s.x&amp;&amp;s.x!==d.x)||(s.y&amp;&amp;s.y!==d.y)||(s.cx&amp;&amp;s.cx!==d.cx)||(s.cy&amp;&amp;s.cy!==d.cy)){Ext.apply(d,s);r.dirtyTransform=true}delete j.scale}Ext.apply(b,j);r.dirty=true;if(m===true&amp;&amp;q){r.redraw()}return this},getBBox:function(){return this.surface.getBBox(this)},setText:function(a){return this.surface.setText(this,a)},hide:function(a){this.setAttributes({hidden:true},a);return this},show:function(a){this.setAttributes({hidden:false},a);return this},remove:function(){if(this.surface){this.surface.remove(this);return true}return false},onRemove:function(){this.surface.onRemove(this)},destroy:function(){var a=this;if(a.fireEvent(&quot;beforedestroy&quot;,a)!==false){a.remove();a.surface.onDestroy(a);a.clearListeners();a.fireEvent(&quot;destroy&quot;)}},redraw:function(){this.surface.renderItem(this);return this},setStyle:function(){this.el.setStyle.apply(this.el,arguments);return this},addCls:function(a){this.surface.addCls(this,a);return this},removeCls:function(a){this.surface.removeCls(this,a);return this}});Ext.define(&quot;Ext.draw.engine.Svg&quot;,{extend:&quot;Ext.draw.Surface&quot;,requires:[&quot;Ext.draw.Draw&quot;,&quot;Ext.draw.Sprite&quot;,&quot;Ext.draw.Matrix&quot;,&quot;Ext.Element&quot;],engine:&quot;Svg&quot;,trimRe:/^\s+|\s+$/g,spacesRe:/\s+/,xlink:&quot;http://www.w3.org/1999/xlink&quot;,translateAttrs:{radius:&quot;r&quot;,radiusX:&quot;rx&quot;,radiusY:&quot;ry&quot;,path:&quot;d&quot;,lineWidth:&quot;stroke-width&quot;,fillOpacity:&quot;fill-opacity&quot;,strokeOpacity:&quot;stroke-opacity&quot;,strokeLinejoin:&quot;stroke-linejoin&quot;},parsers:{},minDefaults:{circle:{cx:0,cy:0,r:0,fill:&quot;none&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:&quot;none&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:&quot;none&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},text:{x:0,y:0,&quot;text-anchor&quot;:&quot;start&quot;,&quot;font-family&quot;:null,&quot;font-size&quot;:null,&quot;font-weight&quot;:null,&quot;font-style&quot;:null,fill:&quot;#000&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},path:{d:&quot;M0,0&quot;,fill:&quot;none&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:&quot;none&quot;,opacity:null}},createSvgElement:function(d,a){var c=this.domRef.createElementNS(&quot;http://www.w3.org/2000/svg&quot;,d),b;if(a){for(b in a){c.setAttribute(b,String(a[b]))}}return c},createSpriteElement:function(a){var b=this.createSvgElement(a.type);b.id=a.id;if(b.style){b.style.webkitTapHighlightColor=&quot;rgba(0,0,0,0)&quot;}a.el=Ext.get(b);this.applyZIndex(a);a.matrix=Ext.create(&quot;Ext.draw.Matrix&quot;);a.bbox={plain:0,transform:0};a.fireEvent(&quot;render&quot;,a);return b},getBBox:function(a,b){var c=this[&quot;getPath&quot;+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(h){var j={},f,k,a,c,g,b;if(h&amp;&amp;h.el){b=h.el.dom;try{j=b.getBBox();return j}catch(d){}j={x:j.x,y:Infinity,width:0,height:0};g=b.getNumberOfChars();for(c=0;c&lt;g;c++){f=b.getExtentOfChar(c);j.y=Math.min(f.y,j.y);k=f.y+f.height-j.y;j.height=Math.max(j.height,k);a=f.x+f.width-j.x;j.width=Math.max(j.width,a)}return j}},hide:function(){Ext.get(this.el).hide()},show:function(){Ext.get(this.el).show()},hidePrim:function(a){this.addCls(a,Ext.baseCSSPrefix+&quot;hide-visibility&quot;)},showPrim:function(a){this.removeCls(a,Ext.baseCSSPrefix+&quot;hide-visibility&quot;)},getDefs:function(){return this._defs||(this._defs=this.createSvgElement(&quot;defs&quot;))},transform:function(d){var g=this,a=Ext.create(&quot;Ext.draw.Matrix&quot;),f=d.transformations,h=f.length,c=0,b,e;for(;c&lt;h;c++){b=f[c];e=b.type;if(e==&quot;translate&quot;){a.translate(b.x,b.y)}else{if(e==&quot;rotate&quot;){a.rotate(b.degrees,b.x,b.y)}else{if(e==&quot;scale&quot;){a.scale(b.x,b.y,b.centerX,b.centerY)}}}}d.matrix=a;d.el.set({transform:a.toSvg()})},setSize:function(a,c){var d=this,b=d.el;a=+a||d.width;c=+c||d.height;d.width=a;d.height=c;b.setSize(a,c);b.set({width:a,height:c});d.callParent([a,c])},getRegion:function(){var e=this.el.getXY(),c=this.bgRect.getXY(),b=Math.max,a=b(e[0],c[0]),d=b(e[1],c[1]);return{left:a,top:d,right:a+this.width,bottom:d+this.height}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},setViewBox:function(b,d,c,a){if(isFinite(b)&amp;&amp;isFinite(d)&amp;&amp;isFinite(c)&amp;&amp;isFinite(a)){this.callParent(arguments);this.el.dom.setAttribute(&quot;viewBox&quot;,[b,d,c,a].join(&quot; &quot;))}},render:function(c){var f=this;if(!f.el){var e=f.width||10,b=f.height||10,d=f.createSvgElement(&quot;svg&quot;,{xmlns:&quot;http://www.w3.org/2000/svg&quot;,version:1.1,width:e,height:b}),a=f.getDefs(),g=f.createSvgElement(&quot;rect&quot;,{width:&quot;100%&quot;,height:&quot;100%&quot;,fill:&quot;#000&quot;,stroke:&quot;none&quot;,opacity:0}),h;if(Ext.isSafari3){h=f.createSvgElement(&quot;rect&quot;,{x:-10,y:-10,width:&quot;110%&quot;,height:&quot;110%&quot;,fill:&quot;none&quot;,stroke:&quot;#000&quot;})}d.appendChild(a);if(Ext.isSafari3){d.appendChild(h)}d.appendChild(g);c.appendChild(d);f.el=Ext.get(d);f.bgRect=Ext.get(g);if(Ext.isSafari3){f.webkitRect=Ext.get(h);f.webkitRect.hide()}f.el.on({scope:f,mouseup:f.onMouseUp,mousedown:f.onMouseDown,mouseover:f.onMouseOver,mouseout:f.onMouseOut,mousemove:f.onMouseMove,mouseenter:f.onMouseEnter,mouseleave:f.onMouseLeave,click:f.onClick})}f.renderAll()},onMouseEnter:function(a){if(this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent(&quot;mouseenter&quot;,a)}},onMouseLeave:function(a){if(!this.el.parent().getRegion().contains(a.getPoint())){this.fireEvent(&quot;mouseleave&quot;,a)}},processEvent:function(b,f){var d=f.getTarget(),a=this.surface,c;this.fireEvent(b,f);if(d.nodeName==&quot;tspan&quot;&amp;&amp;d.parentNode){d=d.parentNode}c=this.items.get(d.id);if(c){c.fireEvent(b,c,f)}},tuneText:function(h,j){var a=h.el.dom,b=[],l,g,k,d,e,c,f;if(j.hasOwnProperty(&quot;text&quot;)){b=this.setText(h,j.text)}if(b.length){l=this.getBBoxText(h).height;for(d=0,e=b.length;d&lt;e;d++){f=(Ext.isFF3_0||Ext.isFF3_5)?2:4;b[d].setAttribute(&quot;dy&quot;,d?l*1.2:l/f)}h.dirty=true}},setText:function(k,d){var g=this,a=k.el.dom,j=a.getAttribute(&quot;x&quot;),b=[],m,h,l,e,f,c;while(a.firstChild){a.removeChild(a.firstChild)}c=String(d).split(&quot;\n&quot;);for(e=0,f=c.length;e&lt;f;e++){l=c[e];if(l){h=g.createSvgElement(&quot;tspan&quot;);h.appendChild(document.createTextNode(Ext.htmlDecode(l)));h.setAttribute(&quot;x&quot;,j);a.appendChild(h);b[e]=h}}return b},renderAll:function(){this.items.each(this.renderItem,this)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.zIndexDirty){this.applyZIndex(a)}if(a.dirty){this.applyAttrs(a);this.applyTransformations(a)}},redraw:function(a){a.dirty=a.zIndexDirty=true;this.renderItem(a)},applyAttrs:function(q){var l=this,c=q.el,p=q.group,h=q.attr,r=l.parsers,f=l.gradientsMap||{},j=Ext.isSafari&amp;&amp;!Ext.isStrict,e,g,k,o,d,n,b,a,m;if(p){e=[].concat(p);k=e.length;for(g=0;g&lt;k;g++){p=e[g];l.getGroup(p).add(q)}delete q.group}o=l.scrubAttrs(q)||{};q.bbox.plain=0;q.bbox.transform=0;if(q.type==&quot;circle&quot;||q.type==&quot;ellipse&quot;){o.cx=o.cx||o.x;o.cy=o.cy||o.y}else{if(q.type==&quot;rect&quot;){o.rx=o.ry=o.r}else{if(q.type==&quot;path&quot;&amp;&amp;o.d){o.d=Ext.draw.Draw.pathToString(Ext.draw.Draw.pathToAbsolute(o.d))}}}q.dirtyPath=false;if(o[&quot;clip-rect&quot;]){l.setClip(q,o);delete o[&quot;clip-rect&quot;]}if(q.type==&quot;text&quot;&amp;&amp;o.font&amp;&amp;q.dirtyFont){c.set({style:&quot;font: &quot;+o.font});q.dirtyFont=false}if(q.type==&quot;image&quot;){c.dom.setAttributeNS(l.xlink,&quot;href&quot;,o.src)}Ext.applyIf(o,l.minDefaults[q.type]);if(q.dirtyHidden){(h.hidden)?l.hidePrim(q):l.showPrim(q);q.dirtyHidden=false}for(n in o){if(o.hasOwnProperty(n)&amp;&amp;o[n]!=null){if(j&amp;&amp;(&quot;color|stroke|fill&quot;.indexOf(n)&gt;-1)&amp;&amp;(o[n] in f)){o[n]=f[o[n]]}if(n in r){c.dom.setAttribute(n,r[n](o[n],q,l))}else{c.dom.setAttribute(n,o[n])}}}if(q.type==&quot;text&quot;){l.tuneText(q,o)}b=h.style;if(b){c.setStyle(b)}q.dirty=false;if(Ext.isSafari3){l.webkitRect.show();setTimeout(function(){l.webkitRect.hide()})}},setClip:function(b,f){var e=this,d=f[&quot;clip-rect&quot;],a,c;if(d){if(b.clip){b.clip.parentNode.parentNode.removeChild(b.clip.parentNode)}a=e.createSvgElement(&quot;clipPath&quot;);c=e.createSvgElement(&quot;rect&quot;);a.id=Ext.id(null,&quot;ext-clip-&quot;);c.setAttribute(&quot;x&quot;,d.x);c.setAttribute(&quot;y&quot;,d.y);c.setAttribute(&quot;width&quot;,d.width);c.setAttribute(&quot;height&quot;,d.height);a.appendChild(c);e.getDefs().appendChild(a);b.el.dom.setAttribute(&quot;clip-path&quot;,&quot;url(#&quot;+a.id+&quot;)&quot;);b.clip=c}},applyZIndex:function(d){var f=this,b=f.items,a=b.indexOf(d),e=d.el,c;if(f.el.dom.childNodes[a+2]!==e.dom){if(a&gt;0){do{c=b.getAt(--a).el}while(!c&amp;&amp;a&gt;0)}e.insertAfter(c||f.bgRect)}d.zIndexDirty=false},createItem:function(a){var b=Ext.create(&quot;Ext.draw.Sprite&quot;,a);b.surface=this;return b},addGradient:function(g){g=Ext.draw.Draw.parseGradient(g);var e=this,d=g.stops.length,a=g.vector,k=Ext.isSafari&amp;&amp;!Ext.isStrict,h,f,j,c,b;b=e.gradientsMap||{};if(!k){if(g.type==&quot;linear&quot;){h=e.createSvgElement(&quot;linearGradient&quot;);h.setAttribute(&quot;x1&quot;,a[0]);h.setAttribute(&quot;y1&quot;,a[1]);h.setAttribute(&quot;x2&quot;,a[2]);h.setAttribute(&quot;y2&quot;,a[3])}else{h=e.createSvgElement(&quot;radialGradient&quot;);h.setAttribute(&quot;cx&quot;,g.centerX);h.setAttribute(&quot;cy&quot;,g.centerY);h.setAttribute(&quot;r&quot;,g.radius);if(Ext.isNumber(g.focalX)&amp;&amp;Ext.isNumber(g.focalY)){h.setAttribute(&quot;fx&quot;,g.focalX);h.setAttribute(&quot;fy&quot;,g.focalY)}}h.id=g.id;e.getDefs().appendChild(h);for(c=0;c&lt;d;c++){f=g.stops[c];j=e.createSvgElement(&quot;stop&quot;);j.setAttribute(&quot;offset&quot;,f.offset+&quot;%&quot;);j.setAttribute(&quot;stop-color&quot;,f.color);j.setAttribute(&quot;stop-opacity&quot;,f.opacity);h.appendChild(j)}}else{b[&quot;url(#&quot;+g.id+&quot;)&quot;]=g.stops[0].color}e.gradientsMap=b},hasCls:function(a,b){return b&amp;&amp;(&quot; &quot;+(a.el.dom.getAttribute(&quot;class&quot;)||&quot;&quot;)+&quot; &quot;).indexOf(&quot; &quot;+b+&quot; &quot;)!=-1},addCls:function(e,g){var f=e.el,d,a,c,b=[],h=f.getAttribute(&quot;class&quot;)||&quot;&quot;;if(!Ext.isArray(g)){if(typeof g==&quot;string&quot;&amp;&amp;!this.hasCls(e,g)){f.set({&quot;class&quot;:h+&quot; &quot;+g})}}else{for(d=0,a=g.length;d&lt;a;d++){c=g[d];if(typeof c==&quot;string&quot;&amp;&amp;(&quot; &quot;+h+&quot; &quot;).indexOf(&quot; &quot;+c+&quot; &quot;)==-1){b.push(c)}}if(b.length){f.set({&quot;class&quot;:&quot; &quot;+b.join(&quot; &quot;)})}}},removeCls:function(j,f){var g=this,b=j.el,d=b.getAttribute(&quot;class&quot;)||&quot;&quot;,c,h,e,k,a;if(!Ext.isArray(f)){f=[f]}if(d){a=d.replace(g.trimRe,&quot; &quot;).split(g.spacesRe);for(c=0,e=f.length;c&lt;e;c++){k=f[c];if(typeof k==&quot;string&quot;){k=k.replace(g.trimRe,&quot;&quot;);h=Ext.Array.indexOf(a,k);if(h!=-1){Ext.Array.erase(a,h,1)}}}b.set({&quot;class&quot;:a.join(&quot; &quot;)})}},destroy:function(){var a=this;a.callParent();if(a.el){a.el.remove()}delete a.el}});Ext.define(&quot;Ext.draw.engine.Vml&quot;,{extend:&quot;Ext.draw.Surface&quot;,requires:[&quot;Ext.draw.Draw&quot;,&quot;Ext.draw.Color&quot;,&quot;Ext.draw.Sprite&quot;,&quot;Ext.draw.Matrix&quot;,&quot;Ext.Element&quot;],engine:&quot;Vml&quot;,map:{M:&quot;m&quot;,L:&quot;l&quot;,C:&quot;c&quot;,Z:&quot;x&quot;,m:&quot;t&quot;,l:&quot;r&quot;,c:&quot;v&quot;,z:&quot;x&quot;},bitesRe:/([clmz]),?([^clmz]*)/gi,valRe:/-?[^,\s-]+/g,fillUrlRe:/^url\(\s*['&quot;]?([^\)]+?)['&quot;]?\s*\)$/i,pathlike:/^(path|rect)$/,NonVmlPathRe:/[ahqstv]/ig,partialPathRe:/[clmz]/g,fontFamilyRe:/^['&quot;]+|['&quot;]+$/g,baseVmlCls:Ext.baseCSSPrefix+&quot;vml-base&quot;,vmlGroupCls:Ext.baseCSSPrefix+&quot;vml-group&quot;,spriteCls:Ext.baseCSSPrefix+&quot;vml-sprite&quot;,measureSpanCls:Ext.baseCSSPrefix+&quot;vml-measure-span&quot;,zoom:21600,coordsize:1000,coordorigin:&quot;0 0&quot;,orderSpritesByZIndex:false,path2vml:function(s){var m=this,t=m.NonVmlPathRe,b=m.map,e=m.valRe,q=m.zoom,d=m.bitesRe,f=Ext.Function.bind(Ext.draw.Draw.pathToAbsolute,Ext.draw.Draw),l,n,c,a,h,o,g,k;if(String(s).match(t)){f=Ext.Function.bind(Ext.draw.Draw.path2curve,Ext.draw.Draw)}else{if(!String(s).match(m.partialPathRe)){l=String(s).replace(d,function(r,v,j){var u=[],i=v.toLowerCase()==&quot;m&quot;,p=b[v];j.replace(e,function(w){if(i&amp;&amp;u[length]==2){p+=u+b[v==&quot;m&quot;?&quot;l&quot;:&quot;L&quot;];u=[]}u.push(Math.round(w*q))});return p+u});return l}}n=f(s);l=[];for(h=0,o=n.length;h&lt;o;h++){c=n[h];a=n[h][0].toLowerCase();if(a==&quot;z&quot;){a=&quot;x&quot;}for(g=1,k=c.length;g&lt;k;g++){a+=Math.round(c[g]*m.zoom)+(g!=k-1?&quot;,&quot;:&quot;&quot;)}l.push(a)}return l.join(&quot; &quot;)},translateAttrs:{radius:&quot;r&quot;,radiusX:&quot;rx&quot;,radiusY:&quot;ry&quot;,lineWidth:&quot;stroke-width&quot;,fillOpacity:&quot;fill-opacity&quot;,strokeOpacity:&quot;stroke-opacity&quot;,strokeLinejoin:&quot;stroke-linejoin&quot;},minDefaults:{circle:{fill:&quot;none&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},ellipse:{cx:0,cy:0,rx:0,ry:0,fill:&quot;none&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},rect:{x:0,y:0,width:0,height:0,rx:0,ry:0,fill:&quot;none&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},text:{x:0,y:0,&quot;text-anchor&quot;:&quot;start&quot;,font:'10px &quot;Arial&quot;',fill:&quot;#000&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},path:{d:&quot;M0,0&quot;,fill:&quot;none&quot;,stroke:null,&quot;stroke-width&quot;:null,opacity:null,&quot;fill-opacity&quot;:null,&quot;stroke-opacity&quot;:null},image:{x:0,y:0,width:0,height:0,preserveAspectRatio:&quot;none&quot;,opacity:null}},onMouseEnter:function(a){this.fireEvent(&quot;mouseenter&quot;,a)},onMouseLeave:function(a){this.fireEvent(&quot;mouseleave&quot;,a)},processEvent:function(b,f){var d=f.getTarget(),a=this.surface,c;this.fireEvent(b,f);c=this.items.get(d.id);if(c){c.fireEvent(b,c,f)}},createSpriteElement:function(g){var e=this,d=g.attr,f=g.type,i=e.zoom,b=g.vml||(g.vml={}),j=Math.round,c=e.createNode(&quot;shape&quot;),k,h,a;c.coordsize=i+&quot; &quot;+i;c.coordorigin=d.coordorigin||&quot;0 0&quot;;Ext.get(c).addCls(e.spriteCls);if(f==&quot;text&quot;){b.path=k=e.createNode(&quot;path&quot;);k.textpathok=true;b.textpath=a=e.createNode(&quot;textpath&quot;);a.on=true;c.appendChild(a);c.appendChild(k)}c.id=g.id;g.el=Ext.get(c);e.el.appendChild(c);if(f!==&quot;image&quot;){h=e.createNode(&quot;skew&quot;);h.on=true;c.appendChild(h);g.skew=h}g.matrix=Ext.create(&quot;Ext.draw.Matrix&quot;);g.bbox={plain:null,transform:null};g.fireEvent(&quot;render&quot;,g);return g.el},getBBox:function(a,b){var c=this[&quot;getPath&quot;+a.type](a);if(b){a.bbox.plain=a.bbox.plain||Ext.draw.Draw.pathDimensions(c);return a.bbox.plain}a.bbox.transform=a.bbox.transform||Ext.draw.Draw.pathDimensions(Ext.draw.Draw.mapPath(c,a.matrix));return a.bbox.transform},getBBoxText:function(b){var a=b.vml;return{x:a.X+(a.bbx||0)-a.W/2,y:a.Y-a.H/2,width:a.W,height:a.H}},applyAttrs:function(m){var s=this,d=m.vml,j=m.group,b=m.attr,c=m.el,o=c.dom,p,u,r,n,k,q,l,t,a;if(j){r=[].concat(j);k=r.length;for(n=0;n&lt;k;n++){j=r[n];s.getGroup(j).add(m)}delete m.group}q=s.scrubAttrs(m)||{};if(m.zIndexDirty){s.setZIndex(m)}Ext.applyIf(q,s.minDefaults[m.type]);if(o.href){o.href=q.href}if(o.title){o.title=q.title}if(o.target){o.target=q.target}if(o.cursor){o.cursor=q.cursor}if(m.dirtyHidden){(q.hidden)?s.hidePrim(m):s.showPrim(m);m.dirtyHidden=false}if(m.dirtyPath){if(m.type==&quot;circle&quot;||m.type==&quot;ellipse&quot;){var f=q.x,e=q.y,h=q.rx||q.r||0,g=q.ry||q.r||0;o.path=Ext.String.format(&quot;ar{0},{1},{2},{3},{4},{1},{4},{1}&quot;,Math.round((f-h)*s.zoom),Math.round((e-g)*s.zoom),Math.round((f+h)*s.zoom),Math.round((e+g)*s.zoom),Math.round(f*s.zoom));m.dirtyPath=false}else{if(m.type!==&quot;text&quot;){m.attr.path=q.path=s.setPaths(m,q)||q.path;o.path=s.path2vml(q.path);m.dirtyPath=false}}}if(&quot;clip-rect&quot; in q){s.setClip(m,q)}if(m.type==&quot;text&quot;){s.setTextAttributes(m,q)}if(m.type==&quot;image&quot;||q.opacity||q[&quot;fill-opacity&quot;]||q.fill){s.setFill(m,q)}if(q.stroke||q[&quot;stroke-opacity&quot;]||q.fill){s.setStroke(m,q)}p=b.style;if(p){c.setStyle(p)}m.dirty=false},setZIndex:function(a){if(a.el){if(a.attr.zIndex!=undefined){a.el.setStyle(&quot;zIndex&quot;,a.attr.zIndex)}a.zIndexDirty=false}},setPaths:function(b,c){var a=b.attr;b.bbox.plain=null;b.bbox.transform=null;if(b.type==&quot;circle&quot;){a.rx=a.ry=c.r;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type==&quot;ellipse&quot;){a.rx=c.rx;a.ry=c.ry;return Ext.draw.Draw.ellipsePath(b)}else{if(b.type==&quot;rect&quot;||b.type==&quot;image&quot;){a.rx=a.ry=c.r;return Ext.draw.Draw.rectPath(b)}else{if(b.type==&quot;path&quot;&amp;&amp;a.path){return Ext.draw.Draw.pathToAbsolute(a.path)}}}}return false},setFill:function(j,d){var g=this,b=j.el,e=b.dom,i=e.getElementsByTagName(&quot;fill&quot;)[0],f,h,a,k,c;if(i){e.removeChild(i)}else{i=g.createNode(&quot;fill&quot;)}if(Ext.isArray(d.fill)){d.fill=d.fill[0]}if(j.type==&quot;image&quot;){i.on=true;i.src=d.src;i.type=&quot;tile&quot;;i.rotate=true}else{if(d.fill==&quot;none&quot;){i.on=false}else{if(typeof d.opacity==&quot;number&quot;){i.opacity=d.opacity}if(typeof d[&quot;fill-opacity&quot;]==&quot;number&quot;){i.opacity=d[&quot;fill-opacity&quot;]}i.on=true;if(typeof d.fill==&quot;string&quot;){a=d.fill.match(g.fillUrlRe);if(a){a=a[1];if(a.charAt(0)==&quot;#&quot;){h=g.gradientsColl.getByKey(a.substring(1))}if(h){k=d.rotation;c=-(h.angle+270+(k?k.degrees:0))%360;if(c===0){c=180}i.angle=c;i.type=&quot;gradient&quot;;i.method=&quot;sigma&quot;;i.colors=h.colors}else{i.src=a;i.type=&quot;tile&quot;;i.rotate=true}}else{i.color=Ext.draw.Color.toHex(d.fill)||d.fill;i.src=&quot;&quot;;i.type=&quot;solid&quot;}}}}e.appendChild(i)},setStroke:function(b,g){var e=this,d=b.el.dom,h=b.strokeEl,f=false,c,a;if(!h){h=b.strokeEl=e.createNode(&quot;stroke&quot;);f=true}if(Ext.isArray(g.stroke)){g.stroke=g.stroke[0]}if(!g.stroke||g.stroke==&quot;none&quot;||g.stroke==0||g[&quot;stroke-width&quot;]==0){h.on=false}else{h.on=true;if(g.stroke&amp;&amp;!g.stroke.match(e.fillUrlRe)){h.color=Ext.draw.Color.toHex(g.stroke)}h.joinstyle=g[&quot;stroke-linejoin&quot;];h.endcap=g[&quot;stroke-linecap&quot;]||&quot;round&quot;;h.miterlimit=g[&quot;stroke-miterlimit&quot;]||8;c=parseFloat(g[&quot;stroke-width&quot;]||1)*0.75;a=g[&quot;stroke-opacity&quot;]||1;if(Ext.isNumber(c)&amp;&amp;c&lt;1){h.weight=1;h.opacity=a*c}else{h.weight=c;h.opacity=a}}if(f){d.appendChild(h)}},setClip:function(b,f){var e=this,c=b.el,a=b.clipEl,d=String(f[&quot;clip-rect&quot;]).split(e.separatorRe);if(!a){a=b.clipEl=e.el.insertFirst(Ext.getDoc().dom.createElement(&quot;div&quot;));a.addCls(Ext.baseCSSPrefix+&quot;vml-sprite&quot;)}if(d.length==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);a.setStyle(&quot;clip&quot;,Ext.String.format(&quot;rect({1}px {2}px {3}px {0}px)&quot;,d[0],d[1],d[2],d[3]));a.setSize(e.el.width,e.el.height)}else{a.setStyle(&quot;clip&quot;,&quot;&quot;)}},setTextAttributes:function(h,c){var g=this,a=h.vml,e=a.textpath.style,f=g.span.style,i=g.zoom,j=Math.round,k={fontSize:&quot;font-size&quot;,fontWeight:&quot;font-weight&quot;,fontStyle:&quot;font-style&quot;},b,d;if(h.dirtyFont){if(c.font){e.font=f.font=c.font}if(c[&quot;font-family&quot;]){e.fontFamily='&quot;'+c[&quot;font-family&quot;].split(&quot;,&quot;)[0].replace(g.fontFamilyRe,&quot;&quot;)+'&quot;';f.fontFamily=c[&quot;font-family&quot;]}for(b in k){d=c[k[b]];if(d){e[b]=f[b]=d}}g.setText(h,c.text);if(a.textpath.string){g.span.innerHTML=String(a.textpath.string).replace(/&lt;/g,&quot;&amp;#60;&quot;).replace(/&amp;/g,&quot;&amp;#38;&quot;).replace(/\n/g,&quot;&lt;br&gt;&quot;)}a.W=g.span.offsetWidth;a.H=g.span.offsetHeight+2;if(c[&quot;text-anchor&quot;]==&quot;middle&quot;){e[&quot;v-text-align&quot;]=&quot;center&quot;}else{if(c[&quot;text-anchor&quot;]==&quot;end&quot;){e[&quot;v-text-align&quot;]=&quot;right&quot;;a.bbx=-Math.round(a.W/2)}else{e[&quot;v-text-align&quot;]=&quot;left&quot;;a.bbx=Math.round(a.W/2)}}}a.X=c.x;a.Y=c.y;a.path.v=Ext.String.format(&quot;m{0},{1}l{2},{1}&quot;,Math.round(a.X*i),Math.round(a.Y*i),Math.round(a.X*i)+1);h.bbox.plain=null;h.bbox.transform=null;h.dirtyFont=false},setText:function(a,b){a.vml.textpath.string=Ext.htmlDecode(b)},hide:function(){this.el.hide()},show:function(){this.el.show()},hidePrim:function(a){a.el.addCls(Ext.baseCSSPrefix+&quot;hide-visibility&quot;)},showPrim:function(a){a.el.removeCls(Ext.baseCSSPrefix+&quot;hide-visibility&quot;)},setSize:function(b,a){var c=this;b=b||c.width;a=a||c.height;c.width=b;c.height=a;if(c.el){if(b!=undefined){c.el.setWidth(b)}if(a!=undefined){c.el.setHeight(a)}c.applyViewBox();c.callParent(arguments)}},setViewBox:function(b,d,c,a){this.callParent(arguments);this.viewBox={x:b,y:d,width:c,height:a};this.applyViewBox()},applyViewBox:function(){var d=this,k=d.viewBox,a=d.width,g=d.height,f,e,i,b,h,c,j;if(k&amp;&amp;(a||g)){f=k.x;e=k.y;i=k.width;b=k.height;h=g/b;c=a/i;if(i*h&lt;a){f-=(a-i*h)/2/h}if(b*c&lt;g){e-=(g-b*c)/2/c}j=1/Math.max(i/a,b/g);d.viewBoxShift={dx:-f,dy:-e,scale:j};d.items.each(function(l){d.transform(l)})}},onAdd:function(a){this.callParent(arguments);if(this.el){this.renderItem(a)}},onRemove:function(a){if(a.el){a.el.remove();delete a.el}this.callParent(arguments)},createNode:(function(){try{var b=Ext.getDoc().dom;if(!b.namespaces.rvml){b.namespaces.add(&quot;rvml&quot;,&quot;urn:schemas-microsoft-com:vml&quot;)}return function(c){return b.createElement(&quot;&lt;rvml:&quot;+c+' class=&quot;rvml&quot;&gt;')}}catch(a){return function(c){return b.createElement(&quot;&lt;&quot;+c+' xmlns=&quot;urn:schemas-microsoft.com:vml&quot; class=&quot;rvml&quot;&gt;')}}})(),render:function(a){var c=this,d=Ext.getDoc().dom;if(!c.el){var b=d.createElement(&quot;div&quot;);c.el=Ext.get(b);c.el.addCls(c.baseVmlCls);c.span=d.createElement(&quot;span&quot;);Ext.get(c.span).addCls(c.measureSpanCls);b.appendChild(c.span);c.el.setSize(c.width||10,c.height||10);a.appendChild(b);c.el.on({scope:c,mouseup:c.onMouseUp,mousedown:c.onMouseDown,mouseover:c.onMouseOver,mouseout:c.onMouseOut,mousemove:c.onMouseMove,mouseenter:c.onMouseEnter,mouseleave:c.onMouseLeave,click:c.onClick})}c.renderAll()},renderAll:function(){this.items.each(this.renderItem,this)},redraw:function(a){a.dirty=true;this.renderItem(a)},renderItem:function(a){if(!this.el){return}if(!a.el){this.createSpriteElement(a)}if(a.dirty){this.applyAttrs(a);if(a.dirtyTransform){this.applyTransformations(a)}}},rotationCompensation:function(d,c,a){var b=Ext.create(&quot;Ext.draw.Matrix&quot;);b.rotate(-d,0.5,0.5);return{x:b.x(c,a),y:b.y(c,a)}},extractTransform:function(j){var g=this,h=Ext.create(&quot;Ext.draw.Matrix&quot;),e,c,a,d,f=0,b=g.viewBoxShift;for(c=j.transformations,a=c.length;f&lt;a;f++){d=c[f];switch(d.type){case&quot;translate&quot;:h.translate(d.x,d.y);break;case&quot;rotate&quot;:h.rotate(d.degrees,d.x,d.y);break;case&quot;scale&quot;:h.scale(d.x||d.scale,d.y||d.scale,d.centerX,d.centerY);break}}if(b){h.add(1,0,0,1,b.dx,b.dy);h.prepend(b.scale,0,0,b.scale,0,0)}return j.matrix=h},setSimpleCoords:function(m,k,j,p,o,e){var i=this,l=m.matrix,d=m.el.dom,a=d.style,c=1,f=&quot;&quot;,n=d.getElementsByTagName(&quot;fill&quot;)[0],h=i.zoom/k,g=i.zoom/j,b;if(!k||!j){return}d.coordsize=Math.abs(h)+&quot; &quot;+Math.abs(g);a.rotation=e*(k*j&lt;0?-1:1);if(e){b=i.rotationCompensation(e,p,o);p=b.x;o=b.y}if(k&lt;0){f+=&quot;x&quot;}if(j&lt;0){f+=&quot; y&quot;;c=-1}a.flip=f;d.coordorigin=(p*-h)+&quot; &quot;+(o*-g);if(n){d.removeChild(n);b=i.rotationCompensation(e,l.x(m.x,m.y),l.y(m.x,m.y));n.position=b.x*c+&quot; &quot;+b.y*c;n.size=m.width*Math.abs(k)+&quot; &quot;+m.height*Math.abs(j);d.appendChild(n)}},transform:function(l){var i=this,b=l.el,p=l.skew,e=b.dom,f=e.style,k=i.extractTransform(l).clone(),j,o=i.zoom,n=e.getElementsByTagName(&quot;fill&quot;)[0],a=!String(l.fill).indexOf(&quot;url(&quot;),d,h;if(l.type!=&quot;image&quot;&amp;&amp;p&amp;&amp;!a){p.matrix=k.toString();d=k.offset();if(d[0]&gt;32767){d[0]=32767}else{if(d[0]&lt;-32768){d[0]=-32768}}if(d[1]&gt;32767){d[1]=32767}else{if(d[1]&lt;-32768){d[1]=-32768}}p.offset=d}else{if(p){p.matrix=&quot;1 0 0 1&quot;;p.offset=&quot;0 0&quot;}j=k.split();if(j.isSimple){f.filter=&quot;&quot;;i.setSimpleCoords(l,j.scaleX,j.scaleY,j.translateX,j.translateY,j.rotate/Math.PI*180)}else{f.filter=k.toFilter();var g=i.getBBox(l),q=g.x-l.x,m=g.y-l.y;e.coordorigin=(q*-o)+&quot; &quot;+(m*-o);if(n){e.removeChild(n);n.position=q+&quot; &quot;+m;n.size=l.width*l.scale.x+&quot; &quot;+l.height*1.1;e.appendChild(n)}}}},createItem:function(a){return Ext.create(&quot;Ext.draw.Sprite&quot;,a)},getRegion:function(){return this.el.getRegion()},addCls:function(a,b){if(a&amp;&amp;a.el){a.el.addCls(b)}},removeCls:function(a,b){if(a&amp;&amp;a.el){a.el.removeCls(b)}},addGradient:function(d){var a=this.gradientsColl||(this.gradientsColl=Ext.create(&quot;Ext.util.MixedCollection&quot;)),b=[],c=Ext.create(&quot;Ext.util.MixedCollection&quot;);c.addAll(d.stops);c.sortByKey(&quot;ASC&quot;,function(f,e){f=parseInt(f,10);e=parseInt(e,10);return f&gt;e?1:(f&lt;e?-1:0)});c.eachKey(function(f,e){b.push(f+&quot;% &quot;+e.color)});a.add(d.id,{colors:b.join(&quot;,&quot;),angle:d.angle})},destroy:function(){var a=this;a.callParent(arguments);if(a.el){a.el.remove()}delete a.el}});Ext.define(&quot;AM.model.User&quot;,{extend:&quot;Ext.data.Model&quot;,fields:[&quot;id&quot;,&quot;name&quot;,&quot;email&quot;]});Ext.define(&quot;AM.store.Users&quot;,{extend:&quot;Ext.data.Store&quot;,model:&quot;AM.model.User&quot;,autoLoad:true,proxy:{type:&quot;ajax&quot;,api:{read:&quot;data/users.json&quot;,update:&quot;data/updateUsers.json&quot;},reader:{type:&quot;json&quot;,root:&quot;users&quot;,successProperty:&quot;success&quot;}}});Ext.define(&quot;Ext.form.FieldAncestor&quot;,{initFieldAncestor:function(){var a=this,b=a.onFieldAncestorSubtreeChange;a.addEvents(&quot;fieldvaliditychange&quot;,&quot;fielderrorchange&quot;);a.on(&quot;add&quot;,b,a);a.on(&quot;remove&quot;,b,a);a.initFieldDefaults()},initFieldDefaults:function(){if(!this.fieldDefaults){this.fieldDefaults={}}},onFieldAncestorSubtreeChange:function(b,e){var c=this,d=!!e.ownerCt;function a(f){var g=f.isFieldLabelable,h=f.isFormField;if(g||h){if(g){c[&quot;onLabelable&quot;+(d?&quot;Added&quot;:&quot;Removed&quot;)](f)}if(h){c[&quot;onField&quot;+(d?&quot;Added&quot;:&quot;Removed&quot;)](f)}}else{if(f.isContainer){Ext.Array.forEach(f.getRefItems(),a)}}}a(e)},onLabelableAdded:function(a){var b=this;b.mon(a,&quot;errorchange&quot;,b.handleFieldErrorChange,b,{buffer:10});a.setFieldDefaults(b.fieldDefaults)},onFieldAdded:function(b){var a=this;a.mon(b,&quot;validitychange&quot;,a.handleFieldValidityChange,a)},onLabelableRemoved:function(a){var b=this;b.mun(a,&quot;errorchange&quot;,b.handleFieldErrorChange,b)},onFieldRemoved:function(b){var a=this;a.mun(b,&quot;validitychange&quot;,a.handleFieldValidityChange,a)},handleFieldValidityChange:function(c,b){var a=this;a.fireEvent(&quot;fieldvaliditychange&quot;,a,c,b);a.onFieldValidityChange()},handleFieldErrorChange:function(b,a){var c=this;c.fireEvent(&quot;fielderrorchange&quot;,c,b,a);c.onFieldErrorChange()},onFieldValidityChange:Ext.emptyFn,onFieldErrorChange:Ext.emptyFn});Ext.define(&quot;Ext.panel.Table&quot;,{extend:&quot;Ext.panel.Panel&quot;,alias:&quot;widget.tablepanel&quot;,uses:[&quot;Ext.selection.RowModel&quot;,&quot;Ext.grid.Scroller&quot;,&quot;Ext.grid.header.Container&quot;,&quot;Ext.grid.Lockable&quot;],extraBaseCls:Ext.baseCSSPrefix+&quot;grid&quot;,extraBodyCls:Ext.baseCSSPrefix+&quot;grid-body&quot;,layout:&quot;fit&quot;,hasView:false,viewType:null,selType:&quot;rowmodel&quot;,scrollDelta:40,scroll:true,deferRowRender:true,sortableColumns:true,enableLocking:false,verticalScrollDock:&quot;right&quot;,verticalScrollerType:&quot;gridscroller&quot;,horizontalScrollerPresentCls:Ext.baseCSSPrefix+&quot;horizontal-scroller-present&quot;,verticalScrollerPresentCls:Ext.baseCSSPrefix+&quot;vertical-scroller-present&quot;,scrollerOwner:true,invalidateScrollerOnRefresh:true,enableColumnMove:true,enableColumnResize:true,enableColumnHide:true,initComponent:function(){var g=this,a=g.scroll,d=false,c=false,h=g.columns||g.colModel,f=0,b,e=g.border;if(g.hideHeaders){e=false}g.store=Ext.data.StoreManager.lookup(g.store||&quot;ext-empty-store&quot;);if(h instanceof Ext.grid.header.Container){g.headerCt=h;g.headerCt.border=e;g.columns=g.headerCt.items.items}else{if(Ext.isArray(h)){h={items:h,border:e}}Ext.apply(h,{forceFit:g.forceFit,sortable:g.sortableColumns,enableColumnMove:g.enableColumnMove,enableColumnResize:g.enableColumnResize,enableColumnHide:g.enableColumnHide,border:e});g.columns=h.items;if(g.enableLocking||Ext.ComponentQuery.query(&quot;{locked !== undefined}{processed != true}&quot;,g.columns).length){g.self.mixin(&quot;lockable&quot;,Ext.grid.Lockable);g.injectLockable()}}g.addEvents(&quot;reconfigure&quot;,&quot;viewready&quot;,&quot;scrollerhide&quot;,&quot;scrollershow&quot;);g.bodyCls=g.bodyCls||&quot;&quot;;g.bodyCls+=(&quot; &quot;+g.extraBodyCls);g.cls=g.cls||&quot;&quot;;g.cls+=(&quot; &quot;+g.extraBaseCls);delete g.autoScroll;if(!g.hasView){if(!g.headerCt){g.headerCt=Ext.create(&quot;Ext.grid.header.Container&quot;,h)}g.columns=g.headerCt.items.items;if(g.hideHeaders){g.headerCt.height=0;g.headerCt.border=false;g.headerCt.addCls(Ext.baseCSSPrefix+&quot;grid-header-ct-hidden&quot;);g.addCls(Ext.baseCSSPrefix+&quot;grid-header-hidden&quot;);if(Ext.isIEQuirks){g.headerCt.style={display:&quot;none&quot;}}}if(a===true||a===&quot;both&quot;){d=c=true}else{if(a===&quot;horizontal&quot;){c=true}else{if(a===&quot;vertical&quot;){d=true}else{g.headerCt.availableSpaceOffset=0}}}if(d){g.verticalScroller=Ext.ComponentManager.create(g.initVerticalScroller());g.mon(g.verticalScroller,{bodyscroll:g.onVerticalScroll,scope:g})}if(c){g.horizontalScroller=Ext.ComponentManager.create(g.initHorizontalScroller());g.mon(g.horizontalScroller,{bodyscroll:g.onHorizontalScroll,scope:g})}g.headerCt.on(&quot;resize&quot;,g.onHeaderResize,g);g.relayHeaderCtEvents(g.headerCt);g.features=g.features||[];if(!Ext.isArray(g.features)){g.features=[g.features]}g.dockedItems=g.dockedItems||[];g.dockedItems.unshift(g.headerCt);g.viewConfig=g.viewConfig||{};g.viewConfig.invalidateScrollerOnRefresh=g.invalidateScrollerOnRefresh;b=g.getView();b.on({afterrender:function(){b.el.scroll=Ext.Function.bind(g.elScroll,g);g.mon(b.el,{mousewheel:g.onMouseWheel,scope:g})},single:true});g.items=[b];g.hasView=true;g.mon(b.store,{load:g.onStoreLoad,scope:g});g.mon(b,{viewReady:g.onViewReady,resize:g.onViewResize,refresh:{fn:g.onViewRefresh,scope:g,buffer:50},scope:g});this.relayEvents(b,[&quot;beforeitemmousedown&quot;,&quot;beforeitemmouseup&quot;,&quot;beforeitemmouseenter&quot;,&quot;beforeitemmouseleave&quot;,&quot;beforeitemclick&quot;,&quot;beforeitemdblclick&quot;,&quot;beforeitemcontextmenu&quot;,&quot;itemmousedown&quot;,&quot;itemmouseup&quot;,&quot;itemmouseenter&quot;,&quot;itemmouseleave&quot;,&quot;itemclick&quot;,&quot;itemdblclick&quot;,&quot;itemcontextmenu&quot;,&quot;beforecontainermousedown&quot;,&quot;beforecontainermouseup&quot;,&quot;beforecontainermouseover&quot;,&quot;beforecontainermouseout&quot;,&quot;beforecontainerclick&quot;,&quot;beforecontainerdblclick&quot;,&quot;beforecontainercontextmenu&quot;,&quot;containermouseup&quot;,&quot;containermouseover&quot;,&quot;containermouseout&quot;,&quot;containerclick&quot;,&quot;containerdblclick&quot;,&quot;containercontextmenu&quot;,&quot;selectionchange&quot;,&quot;beforeselect&quot;,&quot;select&quot;,&quot;beforedeselect&quot;,&quot;deselect&quot;])}g.callParent(arguments)},onRender:function(){var a=this.verticalScroller,b=this.horizontalScroller;if(a){a.ensureDimension()}if(b){b.ensureDimension()}this.callParent(arguments)},initStateEvents:function(){var a=this.stateEvents;Ext.each([&quot;columnresize&quot;,&quot;columnmove&quot;,&quot;columnhide&quot;,&quot;columnshow&quot;,&quot;sortchange&quot;],function(b){if(Ext.Array.indexOf(a,b)){a.push(b)}});this.callParent()},initHorizontalScroller:function(){var b=this,a={xtype:&quot;gridscroller&quot;,dock:&quot;bottom&quot;,section:b,store:b.store};return a},initVerticalScroller:function(){var b=this,a=b.verticalScroller||{};Ext.applyIf(a,{xtype:b.verticalScrollerType,dock:b.verticalScrollDock,store:b.store});return a},relayHeaderCtEvents:function(a){this.relayEvents(a,[&quot;columnresize&quot;,&quot;columnmove&quot;,&quot;columnhide&quot;,&quot;columnshow&quot;,&quot;sortchange&quot;])},getState:function(){var a=this,b=a.callParent(),c=a.store.sorters.first();b.columns=(a.headerCt||a).getColumnsState();if(c){b.sort={property:c.property,direction:c.direction}}return b},applyState:function(d){var c=this,e=d.sort,a=c.store,b=d.columns;delete d.columns;c.callParent(arguments);if(b){(c.headerCt||c).applyColumnsState(b)}if(e){if(a.remoteSort){a.sorters.add(Ext.create(&quot;Ext.util.Sorter&quot;,{property:e.property,direction:e.direction}))}else{a.sort(e.property,e.direction)}}},getStore:function(){return this.store},getView:function(){var a=this,b;if(!a.view){b=a.getSelectionModel();a.view=a.createComponent(Ext.apply({},a.viewConfig,{deferInitialRefresh:a.deferRowRender,xtype:a.viewType,store:a.store,headerCt:a.headerCt,selModel:b,features:a.features,panel:a}));a.mon(a.view,{uievent:a.processEvent,scope:a});b.view=a.view;a.headerCt.view=a.view;a.relayEvents(a.view,[&quot;cellclick&quot;,&quot;celldblclick&quot;])}return a.view},setAutoScroll:Ext.emptyFn,elScroll:function(d,e,b){var c=this,a;if(d===&quot;up&quot;||d===&quot;left&quot;){e=-e}if(d===&quot;down&quot;||d===&quot;up&quot;){a=c.getVerticalScroller();if(a){a.scrollByDeltaY(e)}}else{a=c.getHorizontalScroller();if(a){a.scrollByDeltaX(e)}}},processEvent:function(f,b,a,c,d,h){var g=this,i;if(d!==-1){i=g.headerCt.getGridColumns()[d];return i.processEvent.apply(i,arguments)}},determineScrollbars:function(){if(this.determineScrollbarsRunning){return}this.determineScrollbarsRunning=true;var h=this,i=h.view,d,a,e,j,l,f,g=h.verticalScroller,c=h.horizontalScroller,k=(g&amp;&amp;g.ownerCt===h?1:0)|(c&amp;&amp;c.ownerCt===h?2:0),b=0;if(!h.collapsed&amp;&amp;i&amp;&amp;i.viewReady){d=i.el.getSize();j=d.width+((k&amp;1)?g.width:0);f=d.height+((k&amp;2)?c.height:0);e=(h.headerCt.query(&quot;[flex]&quot;).length&amp;&amp;!h.headerCt.layout.tooNarrow)?0:h.headerCt.getFullWidth();if(g&amp;&amp;g.el){l=g.getSizeCalculation().height}else{a=i.el.child(&quot;table&quot;,true);l=a?a.offsetHeight:0}if(l&gt;f){b=1;if(c&amp;&amp;((j-e)&lt;g.width)){b=3}}else{if(e&gt;j){b=2;if(g&amp;&amp;((f-l)&lt;c.height)){b=3}}}if(b!==k){h.suspendLayout=true;if(b&amp;1){h.showVerticalScroller()}else{h.hideVerticalScroller()}if(b&amp;2){h.showHorizontalScroller()}else{h.hideHorizontalScroller()}h.suspendLayout=false;h.doComponentLayout();h.getLayout().layout()}}delete h.determineScrollbarsRunning},onViewResize:function(){this.determineScrollbars()},afterComponentLayout:function(){this.callParent(arguments);this.determineScrollbars();this.invalidateScroller()},onHeaderResize:function(){if(!this.componentLayout.layoutBusy&amp;&amp;this.view&amp;&amp;this.view.rendered){this.determineScrollbars();this.invalidateScroller()}},afterCollapse:function(){var a=this;if(a.verticalScroller){a.verticalScroller.saveScrollPos()}if(a.horizontalScroller){a.horizontalScroller.saveScrollPos()}a.callParent(arguments)},afterExpand:function(){var a=this;a.callParent(arguments);if(a.verticalScroller){a.verticalScroller.restoreScrollPos()}if(a.horizontalScroller){a.horizontalScroller.restoreScrollPos()}},hideHorizontalScroller:function(){var a=this;if(a.horizontalScroller&amp;&amp;a.horizontalScroller.ownerCt===a){a.verticalScroller.setReservedSpace(0);a.removeDocked(a.horizontalScroller,false);a.removeCls(a.horizontalScrollerPresentCls);a.fireEvent(&quot;scrollerhide&quot;,a.horizontalScroller,&quot;horizontal&quot;)}},showHorizontalScroller:function(){var a=this;if(a.verticalScroller){a.verticalScroller.setReservedSpace(Ext.getScrollbarSize().height-1)}if(a.horizontalScroller&amp;&amp;a.horizontalScroller.ownerCt!==a){a.addDocked(a.horizontalScroller);a.addCls(a.horizontalScrollerPresentCls);a.fireEvent(&quot;scrollershow&quot;,a.horizontalScroller,&quot;horizontal&quot;)}},hideVerticalScroller:function(){var a=this;a.setHeaderReserveOffset(false);if(a.verticalScroller&amp;&amp;a.verticalScroller.ownerCt===a){a.removeDocked(a.verticalScroller,false);a.removeCls(a.verticalScrollerPresentCls);a.fireEvent(&quot;scrollerhide&quot;,a.verticalScroller,&quot;vertical&quot;)}},showVerticalScroller:function(){var a=this;a.setHeaderReserveOffset(true);if(a.verticalScroller&amp;&amp;a.verticalScroller.ownerCt!==a){a.addDocked(a.verticalScroller);a.addCls(a.verticalScrollerPresentCls);a.fireEvent(&quot;scrollershow&quot;,a.verticalScroller,&quot;vertical&quot;)}},setHeaderReserveOffset:function(a){var c=this.headerCt,b=c.layout;if(b&amp;&amp;b.reserveOffset!==a){b.reserveOffset=a;if(!this.suspendLayout){c.doLayout()}}},invalidateScroller:function(){var b=this,a=b.verticalScroller,c=b.horizontalScroller;if(a){a.invalidate()}if(c){c.invalidate()}},onHeaderMove:function(c,d,a,b){this.view.refresh()},onHeaderHide:function(a,b){this.invalidateScroller()},onHeaderShow:function(a,b){this.invalidateScroller()},getVerticalScroller:function(){return this.getScrollerOwner().down(&quot;gridscroller[dock=&quot;+this.verticalScrollDock+&quot;]&quot;)},getHorizontalScroller:function(){return this.getScrollerOwner().down(&quot;gridscroller[dock=bottom]&quot;)},onMouseWheel:function(m){var n=this,j=n.getVerticalScroller(),o=n.getHorizontalScroller(),b=-n.scrollDelta,c=m.getWheelDeltas(),h=b*c.x,g=b*c.y,l,p,a,q,d,i,k,f;if(o){p=o.scrollEl;if(p){q=p.dom;i=q.scrollLeft!==q.scrollWidth-q.clientWidth;d=q.scrollLeft!==0}}if(j){l=j.scrollEl;if(l){a=l.dom;k=a.scrollTop!==a.scrollHeight-a.clientHeight;f=a.scrollTop!==0}}if(o){if((h&lt;0&amp;&amp;d)||(h&gt;0&amp;&amp;i)){m.stopEvent();o.scrollByDeltaX(h)}}if(j){if((g&lt;0&amp;&amp;f)||(g&gt;0&amp;&amp;k)){m.stopEvent();j.scrollByDeltaY(g)}}},onViewReady:function(){var a=this;a.fireEvent(&quot;viewready&quot;,a);if(a.deferRowRender){a.determineScrollbars();a.invalidateScroller()}},onViewRefresh:function(){var a=this;if(!a.rendering){this.determineScrollbars();if(this.invalidateScrollerOnRefresh){this.invalidateScroller()}}},setScrollTop:function(d){var c=this,b=c.getScrollerOwner(),a=c.getVerticalScroller();b.virtualScrollTop=d;if(a){a.setScrollTop(d)}},getScrollerOwner:function(){var a=this;if(!this.scrollerOwner){a=this.up(&quot;[scrollerOwner]&quot;)}return a},scrollByDeltaY:function(a){var b=this.getVerticalScroller();if(b){b.scrollByDeltaY(a)}},scrollByDeltaX:function(a){var b=this.getHorizontalScroller();if(b){b.scrollByDeltaX(a)}},getLhsMarker:function(){var a=this;if(!a.lhsMarker){a.lhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+&quot;grid-resize-marker&quot;},true)}return a.lhsMarker},getRhsMarker:function(){var a=this;if(!a.rhsMarker){a.rhsMarker=Ext.DomHelper.append(a.el,{cls:Ext.baseCSSPrefix+&quot;grid-resize-marker&quot;},true)}return a.rhsMarker},getSelectionModel:function(){if(!this.selModel){this.selModel={}}var b=&quot;SINGLE&quot;,a;if(this.simpleSelect){b=&quot;SIMPLE&quot;}else{if(this.multiSelect){b=&quot;MULTI&quot;}}Ext.applyIf(this.selModel,{allowDeselect:this.allowDeselect,mode:b});if(!this.selModel.events){a=this.selModel.selType||this.selType;this.selModel=Ext.create(&quot;selection.&quot;+a,this.selModel)}if(!this.selModel.hasRelaySetup){this.relayEvents(this.selModel,[&quot;selectionchange&quot;,&quot;beforeselect&quot;,&quot;beforedeselect&quot;,&quot;select&quot;,&quot;deselect&quot;]);this.selModel.hasRelaySetup=true}if(this.disableSelection){this.selModel.locked=true}return this.selModel},onVerticalScroll:function(e,f){var b=this.getScrollerOwner(),c=b.query(&quot;tableview&quot;),d=0,a=c.length;for(;d&lt;a;d++){c[d].el.dom.scrollTop=f.scrollTop}},onHorizontalScroll:function(d,e){var b=this.getScrollerOwner(),c=b.query(&quot;tableview&quot;),a=c[1]||c[0];a.el.dom.scrollLeft=e.scrollLeft;this.headerCt.el.dom.scrollLeft=e.scrollLeft},onStoreLoad:Ext.emptyFn,getEditorParent:function(){return this.body},bindStore:function(a){var b=this;b.store=a;b.getView().bindStore(a)},beforeDestroy:function(){Ext.destroy(this.horizontalScroller,this.verticalScroller);this.callParent()},reconfigure:function(a,b){var c=this,d=c.headerCt;if(c.lockable){c.reconfigureLockable(a,b)}else{if(b){d.suspendLayout=true;d.removeAll();d.add(b)}if(a){a=Ext.StoreManager.lookup(a);c.bindStore(a)}else{c.getView().refresh()}if(b){d.suspendLayout=false;c.forceComponentLayout()}}c.fireEvent(&quot;reconfigure&quot;,c)}});Ext.define(&quot;Ext.form.action.Action&quot;,{alternateClassName:&quot;Ext.form.Action&quot;,submitEmptyText:true,constructor:function(a){if(a){Ext.apply(this,a)}var b=a.params;if(Ext.isString(b)){this.params=Ext.Object.fromQueryString(b)}},run:Ext.emptyFn,onFailure:function(a){this.response=a;this.failureType=Ext.form.action.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&amp;&amp;!a.responseXML){return true}return(this.result=this.handleResponse(a))},getUrl:function(){return this.url||this.form.url},getMethod:function(){return(this.method||this.form.method||&quot;POST&quot;).toUpperCase()},getParams:function(){return Ext.apply({},this.params,this.form.baseParams)},createCallback:function(){var c=this,a,b=c.form;return{success:c.onSuccess,failure:c.onFailure,scope:c,timeout:(this.timeout*1000)||(b.timeout*1000),upload:b.fileUpload?c.onSuccess:a}},statics:{CLIENT_INVALID:&quot;client&quot;,SERVER_INVALID:&quot;server&quot;,CONNECT_FAILURE:&quot;connect&quot;,LOAD_FAILURE:&quot;load&quot;}});Ext.define(&quot;Ext.layout.container.Anchor&quot;,{alias:&quot;layout.anchor&quot;,extend:&quot;Ext.layout.container.Container&quot;,alternateClassName:&quot;Ext.layout.AnchorLayout&quot;,type:&quot;anchor&quot;,defaultAnchor:&quot;100%&quot;,parseAnchorRE:/^(r|right|b|bottom)$/i,onLayout:function(){this.callParent(arguments);var r=this,l=r.getLayoutTargetSize(),a=r.owner,t=r.getTarget(),s=l.width,j=l.height,m=t.getStyle(&quot;overflow&quot;),k=r.getVisibleItems(a),p=k.length,e=[],g,n,h,f,c,d,o,b,q;if(s&lt;20&amp;&amp;j&lt;20){return}if(!r.clearEl){r.clearEl=t.createChild({cls:Ext.baseCSSPrefix+&quot;clear&quot;,role:&quot;presentation&quot;})}if(!Ext.supports.RightMargin){q=Ext.Element.getRightMarginFixCleaner(t);t.addCls(Ext.baseCSSPrefix+&quot;inline-children&quot;)}for(o=0;o&lt;p;o++){h=k[o];b=h.el;f=h.anchorSpec;if(f){if(f.right){c=r.adjustWidthAnchor(f.right(s)-b.getMargin(&quot;lr&quot;),h)}else{c=undefined}if(f.bottom){d=r.adjustHeightAnchor(f.bottom(j)-b.getMargin(&quot;tb&quot;),h)}else{d=undefined}e.push({component:h,anchor:true,width:c||undefined,height:d||undefined})}else{e.push({component:h,anchor:false})}}if(!Ext.supports.RightMargin){t.removeCls(Ext.baseCSSPrefix+&quot;inline-children&quot;);q()}for(o=0;o&lt;p;o++){g=e[o];r.setItemSize(g.component,g.width,g.height)}if(m&amp;&amp;m!=&quot;hidden&quot;&amp;&amp;!r.adjustmentPass){n=r.getLayoutTargetSize();if(n.width!=l.width||n.height!=l.height){r.adjustmentPass=true;r.onLayout()}}delete r.adjustmentPass},parseAnchor:function(c,f,b){if(c&amp;&amp;c!=&quot;none&quot;){var d;if(this.parseAnchorRE.test(c)){var e=b-f;return function(a){return a-e}}else{if(c.indexOf(&quot;%&quot;)!=-1){d=parseFloat(c.replace(&quot;%&quot;,&quot;&quot;))*0.01;return function(a){return Math.floor(a*d)}}else{c=parseInt(c,10);if(!isNaN(c)){return function(a){return a+c}}}}}return null},adjustWidthAnchor:function(b,a){return b},adjustHeightAnchor:function(b,a){return b},configureItem:function(f){var e=this,a=e.owner,d=f.anchor,b,h,c,g;if(!f.anchor&amp;&amp;f.items&amp;&amp;!Ext.isNumber(f.width)&amp;&amp;!(Ext.isIE6&amp;&amp;Ext.isStrict)){f.anchor=d=e.defaultAnchor}if(a.anchorSize){if(typeof a.anchorSize==&quot;number&quot;){c=a.anchorSize}else{c=a.anchorSize.width;g=a.anchorSize.height}}else{c=a.initialConfig.width;g=a.initialConfig.height}if(d){b=d.split(&quot; &quot;);f.anchorSpec=h={right:e.parseAnchor(b[0],f.initialConfig.width,c),bottom:e.parseAnchor(b[1],f.initialConfig.height,g)};if(h.right){f.layoutManagedWidth=1}else{f.layoutManagedWidth=2}if(h.bottom){f.layoutManagedHeight=1}else{f.layoutManagedHeight=2}}else{f.layoutManagedWidth=2;f.layoutManagedHeight=2}this.callParent(arguments)}});Ext.define(&quot;Ext.form.field.VTypes&quot;,(function(){var c=/^[a-zA-Z_]+$/,d=/^[a-zA-Z0-9_]+$/,b=/^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,a=/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&amp;#;`~=%!]*)(\.\w{2,})?)*\/?)/i;return{singleton:true,alternateClassName:&quot;Ext.form.VTypes&quot;,email:function(e){return b.test(e)},emailText:'This field should be an e-mail address in the format &quot;user@example.com&quot;',emailMask:/[a-z0-9_\.\-@\+]/i,url:function(e){return a.test(e)},urlText:'This field should be a URL in the format &quot;http://www.example.com&quot;',alpha:function(e){return c.test(e)},alphaText:&quot;This field should only contain letters and _&quot;,alphaMask:/[a-z_]/i,alphanum:function(e){return d.test(e)},alphanumText:&quot;This field should only contain letters, numbers and _&quot;,alphanumMask:/[a-z0-9_]/i}})());Ext.define(&quot;Ext.layout.component.ProgressBar&quot;,{alias:[&quot;layout.progressbar&quot;],extend:&quot;Ext.layout.component.Component&quot;,type:&quot;progressbar&quot;,onLayout:function(d,b){var e=this,a=e.owner,c=a.textEl;e.setElementSize(a.el,d,b);c.setWidth(a.el.getWidth(true));e.callParent([d,b]);a.updateProgress(a.value)}});Ext.define(&quot;Ext.form.Labelable&quot;,{requires:[&quot;Ext.XTemplate&quot;],labelableRenderTpl:['&lt;tpl if=&quot;!hideLabel &amp;&amp; !(!fieldLabel &amp;&amp; hideEmptyLabel)&quot;&gt;','&lt;label id=&quot;{id}-labelEl&quot;&lt;tpl if=&quot;inputId&quot;&gt; for=&quot;{inputId}&quot;&lt;/tpl&gt; class=&quot;{labelCls}&quot;','&lt;tpl if=&quot;labelStyle&quot;&gt; style=&quot;{labelStyle}&quot;&lt;/tpl&gt;&gt;','&lt;tpl if=&quot;fieldLabel&quot;&gt;{fieldLabel}{labelSeparator}&lt;/tpl&gt;',&quot;&lt;/label&gt;&quot;,&quot;&lt;/tpl&gt;&quot;,'&lt;div class=&quot;{baseBodyCls} {fieldBodyCls}&quot; id=&quot;{id}-bodyEl&quot; role=&quot;presentation&quot;&gt;{subTplMarkup}&lt;/div&gt;','&lt;div id=&quot;{id}-errorEl&quot; class=&quot;{errorMsgCls}&quot; style=&quot;display:none&quot;&gt;&lt;/div&gt;','&lt;div class=&quot;{clearCls}&quot; role=&quot;presentation&quot;&gt;&lt;!-- --&gt;&lt;/div&gt;',{compiled:true,disableFormats:true}],activeErrorsTpl:['&lt;tpl if=&quot;errors &amp;&amp; errors.length&quot;&gt;','&lt;ul&gt;&lt;tpl for=&quot;errors&quot;&gt;&lt;li&lt;tpl if=&quot;xindex == xcount&quot;&gt; class=&quot;last&quot;&lt;/tpl&gt;&gt;{.}&lt;/li&gt;&lt;/tpl&gt;&lt;/ul&gt;',&quot;&lt;/tpl&gt;&quot;],isFieldLabelable:true,formItemCls:Ext.baseCSSPrefix+&quot;form-item&quot;,labelCls:Ext.baseCSSPrefix+&quot;form-item-label&quot;,errorMsgCls:Ext.baseCSSPrefix+&quot;form-error-msg&quot;,baseBodyCls:Ext.baseCSSPrefix+&quot;form-item-body&quot;,fieldBodyCls:&quot;&quot;,clearCls:Ext.baseCSSPrefix+&quot;clear&quot;,invalidCls:Ext.baseCSSPrefix+&quot;form-invalid&quot;,fieldLabel:undefined,labelAlign:&quot;left&quot;,labelWidth:100,labelPad:5,labelSeparator:&quot;:&quot;,hideLabel:false,hideEmptyLabel:true,preventMark:false,autoFitErrors:true,msgTarget:&quot;qtip&quot;,initLabelable:function(){this.addCls(this.formItemCls);this.addEvents(&quot;errorchange&quot;)},getFieldLabel:function(){return this.fieldLabel||&quot;&quot;},getLabelableRenderData:function(){var e=this,b=e.labelAlign,f=e.labelCls,d=e.labelClsExtra,c=e.labelPad,a;if(b===&quot;top&quot;){a=&quot;margin-bottom:&quot;+c+&quot;px;&quot;}else{a=&quot;margin-right:&quot;+c+&quot;px;&quot;;if(Ext.isBorderBox){a+=&quot;width:&quot;+e.labelWidth+&quot;px;&quot;}}return Ext.copyTo({inputId:e.getInputId(),fieldLabel:e.getFieldLabel(),labelCls:d?f+&quot; &quot;+d:f,labelStyle:a+(e.labelStyle||&quot;&quot;),subTplMarkup:e.getSubTplMarkup()},e,&quot;hideLabel,hideEmptyLabel,fieldBodyCls,baseBodyCls,errorMsgCls,clearCls,labelSeparator&quot;,true)},onLabelableRender:function(){this.addChildEls(&quot;labelEl&quot;,&quot;bodyEl&quot;,&quot;errorEl&quot;)},getSubTplMarkup:function(){return&quot;&quot;},getInputId:function(){return&quot;&quot;},getActiveError:function(){return this.activeError||&quot;&quot;},hasActiveError:function(){return !!this.getActiveError()},setActiveError:function(a){this.activeError=a;this.activeErrors=[a];this.renderActiveError()},getActiveErrors:function(){return this.activeErrors||[]},setActiveErrors:function(a){this.activeErrors=a;this.activeError=this.getTpl(&quot;activeErrorsTpl&quot;).apply({errors:a});this.renderActiveError()},unsetActiveError:function(){delete this.activeError;delete this.activeErrors;this.renderActiveError()},renderActiveError:function(){var c=this,b=c.getActiveError(),a=!!b;if(b!==c.lastActiveError){c.fireEvent(&quot;errorchange&quot;,c,b);c.lastActiveError=b}if(c.rendered&amp;&amp;!c.isDestroyed&amp;&amp;!c.preventMark){c.el[a?&quot;addCls&quot;:&quot;removeCls&quot;](c.invalidCls);c.getActionEl().dom.setAttribute(&quot;aria-invalid&quot;,a);c.errorEl.dom.innerHTML=b}},setFieldDefaults:function(b){var a=this;Ext.iterate(b,function(c,d){if(!a.hasOwnProperty(c)){a[c]=d}})},getBodyNaturalWidth:function(){return this.bodyEl.getWidth()}});Ext.define(&quot;Ext.form.field.Field&quot;,{isFormField:true,disabled:false,submitValue:true,validateOnChange:true,suspendCheckChange:0,initField:function(){this.addEvents(&quot;change&quot;,&quot;validitychange&quot;,&quot;dirtychange&quot;);this.initValue()},initValue:function(){var a=this;a.originalValue=a.lastValue=a.value;a.suspendCheckChange++;a.setValue(a.value);a.suspendCheckChange--},getName:function(){return this.name},getValue:function(){return this.value},setValue:function(b){var a=this;a.value=b;a.checkChange();return a},isEqual:function(b,a){return String(b)===String(a)},isEqualAsString:function(b,a){return String(Ext.value(b,&quot;&quot;))===String(Ext.value(a,&quot;&quot;))},getSubmitData:function(){var a=this,b=null;if(!a.disabled&amp;&amp;a.submitValue&amp;&amp;!a.isFileUpload()){b={};b[a.getName()]=&quot;&quot;+a.getValue()}return b},getModelData:function(){var a=this,b=null;if(!a.disabled&amp;&amp;!a.isFileUpload()){b={};b[a.getName()]=a.getValue()}return b},reset:function(){var a=this;a.setValue(a.originalValue);a.clearInvalid();delete a.wasValid},resetOriginalValue:function(){this.originalValue=this.getValue();this.checkDirty()},checkChange:function(){if(!this.suspendCheckChange){var c=this,b=c.getValue(),a=c.lastValue;if(!c.isEqual(b,a)&amp;&amp;!c.isDestroyed){c.lastValue=b;c.fireEvent(&quot;change&quot;,c,b,a);c.onChange(b,a)}}},onChange:function(b,a){if(this.validateOnChange){this.validate()}this.checkDirty()},isDirty:function(){var a=this;return !a.disabled&amp;&amp;!a.isEqual(a.getValue(),a.originalValue)},checkDirty:function(){var a=this,b=a.isDirty();if(b!==a.wasDirty){a.fireEvent(&quot;dirtychange&quot;,a,b);a.onDirtyChange(b);a.wasDirty=b}},onDirtyChange:Ext.emptyFn,getErrors:function(a){return[]},isValid:function(){var a=this;return a.disabled||Ext.isEmpty(a.getErrors())},validate:function(){var a=this,b=a.isValid();if(b!==a.wasValid){a.wasValid=b;a.fireEvent(&quot;validitychange&quot;,a,b)}return b},batchChanges:function(a){try{this.suspendCheckChange++;a()}catch(b){throw b}finally{this.suspendCheckChange--}this.checkChange()},isFileUpload:function(){return false},extractFileInput:function(){return null},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.define(&quot;Ext.layout.component.field.Field&quot;,{alias:[&quot;layout.field&quot;],extend:&quot;Ext.layout.component.Component&quot;,uses:[&quot;Ext.tip.QuickTip&quot;,&quot;Ext.util.TextMetrics&quot;],type:&quot;field&quot;,beforeLayout:function(b,a){var c=this;return c.callParent(arguments)||(!c.owner.preventMark&amp;&amp;c.activeError!==c.owner.getActiveError())},onLayout:function(a,l){var f=this,b=f.owner,e=f.getLabelStrategy(),k=f.getErrorStrategy(),i=Ext.isDefined,m=Ext.isNumber,h,g,j,c,d;h=f.lastComponentSize||{};if(!i(a)){a=h.width;if(a&lt;0){a=d}}if(!i(l)){l=h.height;if(l&lt;0){l=d}}g=!m(a);j=!m(l);c={autoWidth:g,autoHeight:j,width:g?b.getBodyNaturalWidth():a,height:l,setOuterWidth:false,insets:{top:0,right:0,bottom:0,left:0}};e.prepare(b,c);k.prepare(b,c);e.adjustHorizInsets(b,c);k.adjustHorizInsets(b,c);e.layoutHoriz(b,c);k.layoutHoriz(b,c);e.adjustVertInsets(b,c);k.adjustVertInsets(b,c);e.layoutVert(b,c);k.layoutVert(b,c);if(g&amp;&amp;j){f.setElementSize(b.el,(c.setOuterWidth?c.width:d),c.height)}else{f.setTargetSize((!g||c.setOuterWidth?c.width:d),c.height)}f.sizeBody(c);f.activeError=b.getActiveError()},onFocus:function(){this.getErrorStrategy().onFocus(this.owner)},sizeBody:function(h){var g=this,c=g.owner,d=h.insets,b=h.width,e=h.height,f=Ext.isNumber(b)?b-d.left-d.right:b,a=Ext.isNumber(e)?e-d.top-d.bottom:e;g.setElementSize(c.bodyEl,f,a);g.sizeBodyContents(f,a)},sizeBodyContents:Ext.emptyFn,getLabelStrategy:function(){var b=this,c=b.labelStrategies,a=b.owner.labelAlign;return c[a]||c.base},getErrorStrategy:function(){var c=this,a=c.owner,d=c.errorStrategies,b=a.msgTarget;return !a.preventMark&amp;&amp;Ext.isString(b)?(d[b]||d.elementId):d.none},labelStrategies:(function(){var b=Ext.applyIf,a=Ext.emptyFn,c={prepare:function(e,h){var f=e.labelCls+&quot;-&quot;+e.labelAlign,g=e.labelEl;if(g&amp;&amp;!g.hasCls(f)){g.addCls(f)}},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a},d=b({prepare:function(e,f){c.prepare(e,f);if(f.autoWidth){f.width+=(!e.labelEl?0:e.labelWidth+e.labelPad)}f.setOuterWidth=true},adjustHorizInsets:function(e,f){if(e.labelEl){f.insets.left+=e.labelWidth+e.labelPad}},layoutHoriz:function(e,g){var f=e.labelEl;if(f&amp;&amp;!e.isLabelSized&amp;&amp;!Ext.isBorderBox){f.setWidth(e.labelWidth);e.isLabelSized=true}}},c);return{base:c,top:b({adjustVertInsets:function(e,g){var f=e.labelEl;if(f){g.insets.top+=Ext.util.TextMetrics.measure(f,e.fieldLabel,g.width).height+f.getFrameWidth(&quot;tb&quot;)+e.labelPad}}},c),left:d,right:d}})(),errorStrategies:(function(){function d(h,g){var i=h.getStyle(&quot;display&quot;)!==&quot;none&quot;;if(g!==i){h.setDisplayed(g)}}function f(h,g,i){if(h.getStyle(g)!==i){h.setStyle(g,i)}}function c(g){var h=Ext.layout.component.field.Field.tip,i;if(h&amp;&amp;h.isVisible()){i=h.activeTarget;if(i&amp;&amp;i.el===g.getActionEl().dom){h.toFront(true)}}}var b=Ext.applyIf,a=Ext.emptyFn,e={prepare:function(g){d(g.errorEl,false)},adjustHorizInsets:a,adjustVertInsets:a,layoutHoriz:a,layoutVert:a,onFocus:a};return{none:e,side:b({prepare:function(g){var h=g.errorEl;h.addCls(Ext.baseCSSPrefix+&quot;form-invalid-icon&quot;);Ext.layout.component.field.Field.initTip();h.dom.setAttribute(&quot;data-errorqtip&quot;,g.getActiveError()||&quot;&quot;);d(h,g.hasActiveError())},adjustHorizInsets:function(g,h){if(g.autoFitErrors&amp;&amp;g.hasActiveError()){h.insets.right+=g.errorEl.getWidth()}},layoutHoriz:function(g,h){if(g.hasActiveError()){f(g.errorEl,&quot;left&quot;,h.width-h.insets.right+&quot;px&quot;)}},layoutVert:function(g,h){if(g.hasActiveError()){f(g.errorEl,&quot;top&quot;,h.insets.top+&quot;px&quot;)}},onFocus:c},e),under:b({prepare:function(g){var i=g.errorEl,h=Ext.baseCSSPrefix+&quot;form-invalid-under&quot;;if(!i.hasCls(h)){i.addCls(h)}d(i,g.hasActiveError())},adjustVertInsets:function(g,h){if(g.autoFitErrors){h.insets.bottom+=g.errorEl.getHeight()}},layoutHoriz:function(g,i){var j=g.errorEl,h=i.insets;f(j,&quot;width&quot;,i.width-h.right-h.left+&quot;px&quot;);f(j,&quot;marginLeft&quot;,h.left+&quot;px&quot;)}},e),qtip:b({prepare:function(g){d(g.errorEl,false);Ext.layout.component.field.Field.initTip();g.getActionEl().dom.setAttribute(&quot;data-errorqtip&quot;,g.getActiveError()||&quot;&quot;)},onFocus:c},e),title:b({prepare:function(g){d(g.errorEl,false);g.el.dom.title=g.getActiveError()||&quot;&quot;}},e),elementId:b({prepare:function(g){d(g.errorEl,false);var h=Ext.fly(g.msgTarget);if(h){h.dom.innerHTML=g.getActiveError()||&quot;&quot;;h.setDisplayed(g.hasActiveError())}}},e)}})(),statics:{initTip:function(){var a=this.tip;if(!a){a=this.tip=Ext.create(&quot;Ext.tip.QuickTip&quot;,{baseCls:Ext.baseCSSPrefix+&quot;form-invalid-tip&quot;,renderTo:Ext.getBody()});a.tagConfig=Ext.apply({},{attribute:&quot;errorqtip&quot;},a.tagConfig)}},destroyTip:function(){var a=this.tip;if(a){a.destroy();delete this.tip}}}});Ext.define(&quot;Ext.selection.Model&quot;,{extend:&quot;Ext.util.Observable&quot;,alternateClassName:&quot;Ext.AbstractSelectionModel&quot;,requires:[&quot;Ext.data.StoreManager&quot;],allowDeselect:false,selected:null,pruneRemoved:true,constructor:function(a){var b=this;a=a||{};Ext.apply(b,a);b.addEvents(&quot;selectionchange&quot;);b.modes={SINGLE:true,SIMPLE:true,MULTI:true};b.setSelectionMode(a.mode||b.mode);b.selected=Ext.create(&quot;Ext.util.MixedCollection&quot;);b.callParent(arguments)},bind:function(a,b){var c=this;if(!b&amp;&amp;c.store){if(a!==c.store&amp;&amp;c.store.autoDestroy){c.store.destroyStore()}else{c.store.un(&quot;add&quot;,c.onStoreAdd,c);c.store.un(&quot;clear&quot;,c.onStoreClear,c);c.store.un(&quot;remove&quot;,c.onStoreRemove,c);c.store.un(&quot;update&quot;,c.onStoreUpdate,c)}}if(a){a=Ext.data.StoreManager.lookup(a);a.on({add:c.onStoreAdd,clear:c.onStoreClear,remove:c.onStoreRemove,update:c.onStoreUpdate,scope:c})}c.store=a;if(a&amp;&amp;!b){c.refresh()}},selectAll:function(b){var e=this,d=e.store.getRange(),c=0,a=d.length,f=e.getSelection().length;e.bulkChange=true;for(;c&lt;a;c++){e.doSelect(d[c],true,b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==f)},deselectAll:function(b){var e=this,d=e.getSelection(),c=0,a=d.length,f=e.getSelection().length;e.bulkChange=true;for(;c&lt;a;c++){e.doDeselect(d[c],b)}delete e.bulkChange;e.maybeFireSelectionChange(e.getSelection().length!==f)},selectWithEvent:function(a,d,c){var b=this;switch(b.selectionMode){case&quot;MULTI&quot;:if(d.ctrlKey&amp;&amp;b.isSelected(a)){b.doDeselect(a,false)}else{if(d.shiftKey&amp;&amp;b.lastFocused){b.selectRange(b.lastFocused,a,d.ctrlKey)}else{if(d.ctrlKey){b.doSelect(a,true,false)}else{if(b.isSelected(a)&amp;&amp;!d.shiftKey&amp;&amp;!d.ctrlKey&amp;&amp;b.selected.getCount()&gt;1){b.doSelect(a,c,false)}else{b.doSelect(a,false)}}}}break;case&quot;SIMPLE&quot;:if(b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,true)}break;case&quot;SINGLE&quot;:if(b.allowDeselect&amp;&amp;b.isSelected(a)){b.doDeselect(a)}else{b.doSelect(a,false)}break}},selectRange:function(k,e,l,c){var h=this,j=h.store,d=0,g,f,a,b=[];if(h.isLocked()){return}if(!l){h.deselectAll(true)}if(!Ext.isNumber(k)){k=j.indexOf(k)}if(!Ext.isNumber(e)){e=j.indexOf(e)}if(k&gt;e){f=e;e=k;k=f}for(g=k;g&lt;=e;g++){if(h.isSelected(j.getAt(g))){d++}}if(!c){a=-1}else{a=(c==&quot;up&quot;)?k:e}for(g=k;g&lt;=e;g++){if(d==(e-k+1)){if(g!=a){h.doDeselect(g,true)}}else{b.push(j.getAt(g))}}h.doMultiSelect(b,true)},select:function(b,c,a){if(Ext.isDefined(b)){this.doSelect(b,c,a)}},deselect:function(b,a){this.doDeselect(b,a)},doSelect:function(c,e,b){var d=this,a;if(d.locked){return}if(typeof c===&quot;number&quot;){c=[d.store.getAt(c)]}if(d.selectionMode==&quot;SINGLE&quot;&amp;&amp;c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doMultiSelect:function(a,k,j){var g=this,b=g.selected,h=false,d=0,f,e;if(g.locked){return}a=!Ext.isArray(a)?[a]:a;f=a.length;if(!k&amp;&amp;b.getCount()&gt;0){if(g.doDeselect(g.getSelection(),j)===false){return}}function c(){b.add(e);h=true}for(;d&lt;f;d++){e=a[d];if(k&amp;&amp;g.isSelected(e)){continue}g.lastSelected=e;g.onSelectChange(e,true,j,c)}g.setLastFocused(e,j);g.maybeFireSelectionChange(h&amp;&amp;!j)},doDeselect:function(a,j){var h=this,b=h.selected,d=0,g,e,k=0,f=0;if(h.locked){return false}if(typeof a===&quot;number&quot;){a=[h.store.getAt(a)]}else{if(!Ext.isArray(a)){a=[a]}}function c(){++f;b.remove(e)}g=a.length;for(;d&lt;g;d++){e=a[d];if(h.isSelected(e)){if(h.lastSelected==e){h.lastSelected=b.last()}++k;h.onSelectChange(e,false,j,c)}}h.maybeFireSelectionChange(f&gt;0&amp;&amp;!j);return f===k},doSingleSelect:function(a,b){var d=this,f=false,c=d.selected;if(d.locked){return}if(d.isSelected(a)){return}function e(){d.bulkChange=true;if(c.getCount()&gt;0&amp;&amp;d.doDeselect(d.lastSelected,b)===false){delete d.bulkChange;return false}delete d.bulkChange;c.add(a);d.lastSelected=a;f=true}d.onSelectChange(a,true,b,e);if(f){if(!b){d.setLastFocused(a)}d.maybeFireSelectionChange(!b)}},setLastFocused:function(c,b){var d=this,a=d.lastFocused;d.lastFocused=c;d.onLastFocusChanged(a,c,b)},isFocused:function(a){return a===this.getLastFocused()},maybeFireSelectionChange:function(a){var b=this;if(a&amp;&amp;!b.bulkChange){b.fireEvent(&quot;selectionchange&quot;,b,b.getSelection())}},getLastSelected:function(){return this.lastSelected},getLastFocused:function(){return this.lastFocused},getSelection:function(){return this.selected.getRange()},getSelectionMode:function(){return this.selectionMode},setSelectionMode:function(a){a=a?a.toUpperCase():&quot;SINGLE&quot;;this.selectionMode=this.modes[a]?a:&quot;SINGLE&quot;},isLocked:function(){return this.locked},setLocked:function(a){this.locked=!!a},isSelected:function(a){a=Ext.isNumber(a)?this.store.getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()&gt;0},refresh:function(){var g=this,b=[],f=g.getSelection(),a=f.length,e,h,d=0,c=this.getLastFocused();for(;d&lt;a;d++){e=f[d];if(!this.pruneRemoved||g.store.indexOf(e)!==-1){b.push(e)}}if(g.selected.getCount()!=b.length){h=true}g.clearSelections();if(g.store.indexOf(c)!==-1){this.setLastFocused(c,true)}if(b.length){g.doSelect(b,false,true)}g.maybeFireSelectionChange(h)},clearSelections:function(){this.selected.clear();this.lastSelected=null;this.setLastFocused(null)},onStoreAdd:function(){},onStoreClear:function(){if(this.selected.getCount&gt;0){this.clearSelections();this.maybeFireSelectionChange(true)}},onStoreRemove:function(b,a){var d=this,c=d.selected;if(d.locked||!d.pruneRemoved){return}if(c.remove(a)){if(d.lastSelected==a){d.lastSelected=null}if(d.getLastFocused()==a){d.setLastFocused(null)}d.maybeFireSelectionChange(true)}},getCount:function(){return this.selected.getCount()},destroy:function(){},onStoreUpdate:function(){},onSelectChange:function(a,c,b){},onLastFocusChanged:function(b,a){},onEditorKey:function(b,a){},bindComponent:function(a){}});Ext.define(&quot;Ext.form.action.Load&quot;,{extend:&quot;Ext.form.action.Action&quot;,requires:[&quot;Ext.data.Connection&quot;],alternateClassName:&quot;Ext.form.Action.Load&quot;,alias:&quot;formaction.load&quot;,type:&quot;load&quot;,run:function(){Ext.Ajax.request(Ext.apply(this.createCallback(),{method:this.getMethod(),url:this.getUrl(),headers:this.headers,params:this.getParams()}))},onSuccess:function(b){var a=this.processResponse(b),c=this.form;if(a===true||!a.success||!a.data){this.failureType=Ext.form.action.Action.LOAD_FAILURE;c.afterAction(this,false);return}c.clearInvalid();c.setValues(a.data);c.afterAction(this,true)},handleResponse:function(c){var a=this.form.reader,b,d;if(a){b=a.read(c);d=b.records&amp;&amp;b.records[0]?b.records[0].data:null;return{success:b.success,data:d}}return Ext.decode(c.responseText)}});Ext.define(&quot;Ext.form.action.Submit&quot;,{extend:&quot;Ext.form.action.Action&quot;,alternateClassName:&quot;Ext.form.Action.Submit&quot;,alias:&quot;formaction.submit&quot;,type:&quot;submit&quot;,run:function(){var a=this.form;if(this.clientValidation===false||a.isValid()){this.doSubmit()}else{this.failureType=Ext.form.action.Action.CLIENT_INVALID;a.afterAction(this,false)}},doSubmit:function(){var b,a=Ext.apply(this.createCallback(),{url:this.getUrl(),method:this.getMethod(),headers:this.headers});if(this.form.hasUpload()){b=a.form=this.buildForm();a.isUpload=true}else{a.params=this.getParams()}Ext.Ajax.request(a);if(b){Ext.removeNode(b)}},getParams:function(){var c=false,b=this.callParent(),a=this.form.getValues(c,c,this.submitEmptyText!==c);return Ext.apply({},a,b)},buildForm:function(){var c=[],d,e,b=this.form,g=this.getParams(),a=[];b.getFields().each(function(h){if(h.isFileUpload()){a.push(h)}});function f(h,i){c.push({tag:&quot;input&quot;,type:&quot;hidden&quot;,name:h,value:Ext.String.htmlEncode(i)})}Ext.iterate(g,function(h,i){if(Ext.isArray(i)){Ext.each(i,function(j){f(h,j)})}else{f(h,i)}});d={tag:&quot;form&quot;,action:this.getUrl(),method:this.getMethod(),target:this.target||&quot;_self&quot;,style:&quot;display:none&quot;,cn:c};if(a.length){d.encoding=d.enctype=&quot;multipart/form-data&quot;}e=Ext.DomHelper.append(Ext.getBody(),d);Ext.Array.each(a,function(h){if(h.rendered){e.appendChild(h.extractFileInput())}});return e},onSuccess:function(b){var c=this.form,d=true,a=this.processResponse(b);if(a!==true&amp;&amp;!a.success){if(a.errors){c.markInvalid(a.errors)}this.failureType=Ext.form.action.Action.SERVER_INVALID;d=false}c.afterAction(this,d)},handleResponse:function(d){var g=this.form,e=g.errorReader,c,h,f,a,b;if(e){c=e.read(d);b=c.records;h=[];if(b){for(f=0,a=b.length;f&lt;a;f++){h[f]=b[f].data}}if(h.length&lt;1){h=null}return{success:c.success,errors:h}}return Ext.decode(d.responseText)}});Ext.define(&quot;Ext.ProgressBar&quot;,{extend:&quot;Ext.Component&quot;,alias:&quot;widget.progressbar&quot;,requires:[&quot;Ext.Template&quot;,&quot;Ext.CompositeElement&quot;,&quot;Ext.TaskManager&quot;,&quot;Ext.layout.component.ProgressBar&quot;],uses:[&quot;Ext.fx.Anim&quot;],baseCls:Ext.baseCSSPrefix+&quot;progress&quot;,config:{animate:false,text:&quot;&quot;},waitTimer:null,renderTpl:['&lt;div class=&quot;{baseCls}-text {baseCls}-text-back&quot;&gt;',&quot;&lt;div&gt;&amp;#160;&lt;/div&gt;&quot;,&quot;&lt;/div&gt;&quot;,'&lt;div id=&quot;{id}-bar&quot; class=&quot;{baseCls}-bar&quot;&gt;','&lt;div class=&quot;{baseCls}-text&quot;&gt;',&quot;&lt;div&gt;&amp;#160;&lt;/div&gt;&quot;,&quot;&lt;/div&gt;&quot;,&quot;&lt;/div&gt;&quot;],componentLayout:&quot;progressbar&quot;,initComponent:function(){this.callParent();this.addChildEls(&quot;bar&quot;);this.addEvents(&quot;update&quot;)},afterRender:function(){var a=this;a.textEl=a.textEl?Ext.get(a.textEl):a.el.select(&quot;.&quot;+a.baseCls+&quot;-text&quot;);a.callParent(arguments);if(a.value){a.updateProgress(a.value,a.text)}else{a.updateText(a.text)}},updateProgress:function(d,e,a){var c=this,b;c.value=d||0;if(e){c.updateText(e)}if(c.rendered&amp;&amp;!c.isDestroyed){if(c.isVisible(true)){b=Math.floor(c.value*c.el.getWidth(true));if(Ext.isForcedBorderBox){b+=c.bar.getBorderWidth(&quot;lr&quot;)}if(a===true||(a!==false&amp;&amp;c.animate)){c.bar.stopAnimation();c.bar.animate(Ext.apply({to:{width:b+&quot;px&quot;}},c.animate))}else{c.bar.setWidth(b)}}else{c.doComponentLayout()}}c.fireEvent(&quot;update&quot;,c,c.value,e);return c},updateText:function(b){var a=this;a.text=b;if(a.rendered){a.textEl.update(a.text)}return a},applyText:function(a){this.updateText(a)},wait:function(b){var a=this;if(!a.waitTimer){scope=a;b=b||{};a.updateText(b.text);a.waitTimer=Ext.TaskManager.start({run:function(c){var d=b.increment||10;c-=1;a.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||a)}a.reset()},scope:scope})}return a},isWaiting:function(){return this.waitTimer!==null},reset:function(a){var b=this;b.updateProgress(0);b.clearTimer();if(a===true){b.hide()}return b},clearTimer:function(){var a=this;if(a.waitTimer){a.waitTimer.onStop=null;Ext.TaskManager.stop(a.waitTimer);a.waitTimer=null}},onDestroy:function(){var a=this;a.clearTimer();if(a.rendered){if(a.textEl.isComposite){a.textEl.clear()}Ext.destroyMembers(a,&quot;textEl&quot;,&quot;progressBar&quot;)}a.callParent()}});Ext.define(&quot;Ext.form.field.Base&quot;,{extend:&quot;Ext.Component&quot;,mixins:{labelable:&quot;Ext.form.Labelable&quot;,field:&quot;Ext.form.field.Field&quot;},alias:&quot;widget.field&quot;,alternateClassName:[&quot;Ext.form.Field&quot;,&quot;Ext.form.BaseField&quot;],requires:[&quot;Ext.util.DelayedTask&quot;,&quot;Ext.XTemplate&quot;,&quot;Ext.layout.component.field.Field&quot;],fieldSubTpl:['&lt;input id=&quot;{id}&quot; type=&quot;{type}&quot; ','&lt;tpl if=&quot;name&quot;&gt;name=&quot;{name}&quot; &lt;/tpl&gt;','&lt;tpl if=&quot;size&quot;&gt;size=&quot;{size}&quot; &lt;/tpl&gt;','&lt;tpl if=&quot;tabIdx&quot;&gt;tabIndex=&quot;{tabIdx}&quot; &lt;/tpl&gt;','class=&quot;{fieldCls} {typeCls}&quot; autocomplete=&quot;off&quot; /&gt;',{compiled:true,disableFormats:true}],inputType:&quot;text&quot;,invalidText:&quot;The value in this field is invalid&quot;,fieldCls:Ext.baseCSSPrefix+&quot;form-field&quot;,focusCls:Ext.baseCSSPrefix+&quot;form-focus&quot;,dirtyCls:Ext.baseCSSPrefix+&quot;form-dirty&quot;,checkChangeEvents:Ext.isIE&amp;&amp;(!document.documentMode||document.documentMode&lt;9)?[&quot;change&quot;,&quot;propertychange&quot;]:[&quot;change&quot;,&quot;input&quot;,&quot;textInput&quot;,&quot;keyup&quot;,&quot;dragdrop&quot;],checkChangeBuffer:50,componentLayout:&quot;field&quot;,readOnly:false,readOnlyCls:Ext.baseCSSPrefix+&quot;form-readonly&quot;,validateOnBlur:true,hasFocus:false,baseCls:Ext.baseCSSPrefix+&quot;field&quot;,maskOnDisable:false,initComponent:function(){var a=this;a.callParent();a.subTplData=a.subTplData||{};a.addEvents(&quot;focus&quot;,&quot;blur&quot;,&quot;specialkey&quot;);a.initLabelable();a.initField();if(!a.name){a.name=a.getInputId()}},getInputId:function(){return this.inputId||(this.inputId=Ext.id())},getSubTplData:function(){var c=this,b=c.inputType,a=c.getInputId();return Ext.applyIf(c.subTplData,{id:a,cmpId:c.id,name:c.name||a,type:b,size:c.size||20,cls:c.cls,fieldCls:c.fieldCls,tabIdx:c.tabIndex,typeCls:Ext.baseCSSPrefix+&quot;form-&quot;+(b===&quot;password&quot;?&quot;text&quot;:b)})},afterRender:function(){this.callParent();if(this.inputEl){this.inputEl.selectable()}},getSubTplMarkup:function(){return this.getTpl(&quot;fieldSubTpl&quot;).apply(this.getSubTplData())},initRenderTpl:function(){var a=this;if(!a.hasOwnProperty(&quot;renderTpl&quot;)){a.renderTpl=a.getTpl(&quot;labelableRenderTpl&quot;)}return a.callParent()},initRenderData:function(){return Ext.applyIf(this.callParent(),this.getLabelableRenderData())},setFieldStyle:function(a){var b=this,c=b.inputEl;if(c){c.applyStyles(a)}b.fieldStyle=a},onRender:function(){var b=this,a=b.fieldStyle;b.onLabelableRender();b.addChildEls({name:&quot;inputEl&quot;,id:b.getInputId()});b.callParent(arguments);b.setRawValue(b.rawValue);if(b.readOnly){b.setReadOnly(true)}if(b.disabled){b.disable()}if(a){b.setFieldStyle(a)}b.renderActiveError()},initAria:function(){var a=this;a.callParent();a.getActionEl().dom.setAttribute(&quot;aria-describedby&quot;,Ext.id(a.errorEl))},getFocusEl:function(){return this.inputEl},isFileUpload:function(){return this.inputType===&quot;file&quot;},extractFileInput:function(){var b=this,a=b.isFileUpload()?b.inputEl.dom:null,c;if(a){c=a.cloneNode(true);a.parentNode.replaceChild(c,a);b.inputEl=Ext.get(c)}return a},getSubmitData:function(){var a=this,b=null,c;if(!a.disabled&amp;&amp;a.submitValue&amp;&amp;!a.isFileUpload()){c=a.getSubmitValue();if(c!==null){b={};b[a.getName()]=c}}return b},getSubmitValue:function(){return this.processRawValue(this.getRawValue())},getRawValue:function(){var b=this,a=(b.inputEl?b.inputEl.getValue():Ext.value(b.rawValue,&quot;&quot;));b.rawValue=a;return a},setRawValue:function(b){var a=this;b=Ext.value(b,&quot;&quot;);a.rawValue=b;if(a.inputEl){a.inputEl.dom.value=b}return b},valueToRaw:function(a){return&quot;&quot;+Ext.value(a,&quot;&quot;)},rawToValue:function(a){return a},processRawValue:function(a){return a},getValue:function(){var a=this,b=a.rawToValue(a.processRawValue(a.getRawValue()));a.value=b;return b},setValue:function(b){var a=this;a.setRawValue(a.valueToRaw(b));return a.mixins.field.setValue.call(a,b)},onDisable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=true}},onEnable:function(){var a=this,b=a.inputEl;a.callParent();if(b){b.dom.disabled=false}},setReadOnly:function(c){var a=this,b=a.inputEl;if(b){b.dom.readOnly=c;b.dom.setAttribute(&quot;aria-readonly&quot;,c)}a[c?&quot;addCls&quot;:&quot;removeCls&quot;](a.readOnlyCls);a.readOnly=c},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent(&quot;specialkey&quot;,this,Ext.create(&quot;Ext.EventObjectImpl&quot;,a))}},initEvents:function(){var b=this,c=b.inputEl,a,d;if(c){b.mon(c,Ext.EventManager.getKeyEvent(),b.fireKey,b);b.mon(c,&quot;focus&quot;,b.onFocus,b);b.mon(c,&quot;blur&quot;,b.onBlur,b,b.inEditor?{buffer:10}:null);a=Ext.create(&quot;Ext.util.DelayedTask&quot;,b.checkChange,b);b.onChangeEvent=d=function(){a.delay(b.checkChangeBuffer)};Ext.each(b.checkChangeEvents,function(e){if(e===&quot;propertychange&quot;){b.usesPropertychange=true}b.mon(c,e,d)},b)}b.callParent()},doComponentLayout:function(){var c=this,d=c.inputEl,a=c.usesPropertychange,b=&quot;propertychange&quot;,e=c.onChangeEvent;if(a){c.mun(d,b,e)}c.callParent(arguments);if(a){c.mon(d,b,e)}},preFocus:Ext.emptyFn,onFocus:function(){var b=this,a=b.focusCls,c=b.inputEl;b.preFocus();if(a&amp;&amp;c){c.addCls(a)}if(!b.hasFocus){b.hasFocus=true;b.componentLayout.onFocus();b.fireEvent(&quot;focus&quot;,b)}},beforeBlur:Ext.emptyFn,onBlur:function(){var b=this,a=b.focusCls,c=b.inputEl;if(b.destroying){return}b.beforeBlur();if(a&amp;&amp;c){c.removeCls(a)}if(b.validateOnBlur){b.validate()}b.hasFocus=false;b.fireEvent(&quot;blur&quot;,b);b.postBlur()},postBlur:Ext.emptyFn,onDirtyChange:function(a){this[a?&quot;addCls&quot;:&quot;removeCls&quot;](this.dirtyCls)},isValid:function(){var a=this;return a.disabled||a.validateValue(a.processRawValue(a.getRawValue()))},validateValue:function(b){var a=this,d=a.getErrors(b),c=Ext.isEmpty(d);if(!a.preventMark){if(c){a.clearInvalid()}else{a.markInvalid(d)}}return c},markInvalid:function(c){var b=this,a=b.getActiveError();b.setActiveErrors(Ext.Array.from(c));if(a!==b.getActiveError()){b.doComponentLayout()}},clearInvalid:function(){var b=this,a=b.hasActiveError();b.unsetActiveError();if(a){b.doComponentLayout()}},renderActiveError:function(){var b=this,a=b.hasActiveError();if(b.inputEl){b.inputEl[a?&quot;addCls&quot;:&quot;removeCls&quot;](b.invalidCls+&quot;-field&quot;)}b.mixins.labelable.renderActiveError.call(b)},getActionEl:function(){return this.inputEl||this.el}});Ext.define(&quot;Ext.layout.component.field.Text&quot;,{extend:&quot;Ext.layout.component.field.Field&quot;,alias:&quot;layout.textfield&quot;,requires:[&quot;Ext.util.TextMetrics&quot;],type:&quot;textfield&quot;,beforeLayout:function(d,b){var e=this,a=e.owner,c=this.lastValue,f=a.getRawValue();this.lastValue=f;return e.callParent(arguments)||(a.grow&amp;&amp;f!==c)},sizeBodyContents:function(c,a){var b=this.adjustForGrow(c,a);this.setElementSize(this.owner.inputEl,b[0],b[1])},adjustForGrow:function(e,c){var f=this,b=f.owner,h,g,d,a=[e,c];if(b.grow){h=b.inputEl;g=(h.dom.value||(b.hasFocus?&quot;&quot;:b.emptyText)||&quot;&quot;)+b.growAppend;d=h.getTextWidth(g)+h.getBorderWidth(&quot;lr&quot;)+h.getPadding(&quot;lr&quot;);a[0]=Ext.Number.constrain(d,b.growMin,Math.max(b.growMin,Math.min(b.growMax,Ext.isNumber(e)?e:Infinity)))}return a}});Ext.define(&quot;Ext.form.field.Text&quot;,{extend:&quot;Ext.form.field.Base&quot;,alias:&quot;widget.textfield&quot;,requires:[&quot;Ext.form.field.VTypes&quot;,&quot;Ext.layout.component.field.Text&quot;],alternateClassName:[&quot;Ext.form.TextField&quot;,&quot;Ext.form.Text&quot;],size:20,growMin:30,growMax:800,growAppend:&quot;W&quot;,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:&quot;The minimum length for this field is {0}&quot;,maxLengthText:&quot;The maximum length for this field is {0}&quot;,blankText:&quot;This field is required&quot;,regexText:&quot;&quot;,emptyCls:Ext.baseCSSPrefix+&quot;form-empty-field&quot;,ariaRole:&quot;textbox&quot;,componentLayout:&quot;textfield&quot;,initComponent:function(){this.callParent();this.addEvents(&quot;autosize&quot;,&quot;keydown&quot;,&quot;keyup&quot;,&quot;keypress&quot;)},initEvents:function(){var b=this,a=b.inputEl;b.callParent();if(b.selectOnFocus||b.emptyText){b.mon(a,&quot;mousedown&quot;,b.onMouseDown,b)}if(b.maskRe||(b.vtype&amp;&amp;b.disableKeyFilter!==true&amp;&amp;(b.maskRe=Ext.form.field.VTypes[b.vtype+&quot;Mask&quot;]))){b.mon(a,&quot;keypress&quot;,b.filterKeys,b)}if(b.enableKeyEvents){b.mon(a,{scope:b,keyup:b.onKeyUp,keydown:b.onKeyDown,keypress:b.onKeyPress})}},isEqual:function(b,a){return this.isEqualAsString(b,a)},onChange:function(){this.callParent();this.autoSize()},afterRender:function(){var a=this;if(a.enforceMaxLength){a.inputEl.dom.maxLength=a.maxLength}a.applyEmptyText();a.autoSize();a.callParent()},onMouseDown:function(b){var a=this;if(!a.hasFocus){a.mon(a.inputEl,&quot;mouseup&quot;,Ext.emptyFn,a,{single:true,preventDefault:true})}},processRawValue:function(b){var a=this,d=a.stripCharsRe,c;if(d){c=b.replace(d,&quot;&quot;);if(c!==b){a.setRawValue(c);b=c}}return b},onDisable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=&quot;on&quot;}},onEnable:function(){this.callParent();if(Ext.isIE){this.inputEl.dom.unselectable=&quot;&quot;}},onKeyDown:function(a){this.fireEvent(&quot;keydown&quot;,this,a)},onKeyUp:function(a){this.fireEvent(&quot;keyup&quot;,this,a)},onKeyPress:function(a){this.fireEvent(&quot;keypress&quot;,this,a)},reset:function(){this.callParent();this.applyEmptyText()},applyEmptyText:function(){var b=this,a=b.emptyText,c;if(b.rendered&amp;&amp;a){c=b.getRawValue().length&lt;1&amp;&amp;!b.hasFocus;if(Ext.supports.Placeholder){b.inputEl.dom.placeholder=a}else{if(c){b.setRawValue(a)}}if(c){b.inputEl.addCls(b.emptyCls)}b.autoSize()}},preFocus:function(){var b=this,c=b.inputEl,a=b.emptyText,d;if(a&amp;&amp;!Ext.supports.Placeholder&amp;&amp;c.dom.value===a){b.setRawValue(&quot;&quot;);d=true;c.removeCls(b.emptyCls)}else{if(Ext.supports.Placeholder){b.inputEl.removeCls(b.emptyCls)}}if(b.selectOnFocus||d){c.dom.select()}},onFocus:function(){var a=this;a.callParent(arguments);if(a.emptyText){a.autoSize()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(c){if(c.ctrlKey&amp;&amp;!c.altKey){return}var b=c.getKey(),a=String.fromCharCode(c.getCharCode());if(Ext.isGecko&amp;&amp;(c.isNavKeyPress()||b===c.BACKSPACE||(b===c.DELETE&amp;&amp;c.button===-1))){return}if(!Ext.isGecko&amp;&amp;c.isSpecialKey()&amp;&amp;!a){return}if(!this.maskRe.test(a)){c.stopEvent()}},getRawValue:function(){var b=this,a=b.callParent();if(a===b.emptyText){a=&quot;&quot;}return a},setValue:function(b){var a=this,c=a.inputEl;if(c&amp;&amp;a.emptyText&amp;&amp;!Ext.isEmpty(b)){c.removeCls(a.emptyCls)}a.callParent(arguments);a.applyEmptyText();return a},getErrors:function(k){var f=this,j=f.callParent(arguments),a=f.validator,d=f.emptyText,c=f.allowBlank,e=f.vtype,g=Ext.form.field.VTypes,h=f.regex,i=Ext.String.format,b;k=k||f.processRawValue(f.getRawValue());if(Ext.isFunction(a)){b=a.call(f,k);if(b!==true){j.push(b)}}if(k.length&lt;1||k===d){if(!c){j.push(f.blankText)}return j}if(k.length&lt;f.minLength){j.push(i(f.minLengthText,f.minLength))}if(k.length&gt;f.maxLength){j.push(i(f.maxLengthText,f.maxLength))}if(e){if(!g[e](k,f)){j.push(f.vtypeText||g[e+&quot;Text&quot;])}}if(h&amp;&amp;!h.test(k)){j.push(f.regexText||f.invalidText)}return j},selectText:function(h,a){var g=this,c=g.getRawValue(),d=true,f=g.inputEl.dom,e,b;if(c.length&gt;0){h=h===e?0:h;a=a===e?c.length:a;if(f.setSelectionRange){f.setSelectionRange(h,a)}else{if(f.createTextRange){b=f.createTextRange();b.moveStart(&quot;character&quot;,h);b.moveEnd(&quot;character&quot;,a-c.length);b.select()}}d=Ext.isGecko||Ext.isOpera}if(d){g.focus()}},autoSize:function(){var b=this,a;if(b.grow&amp;&amp;b.rendered){b.doComponentLayout();a=b.inputEl.getWidth();if(a!==b.lastInputWidth){b.fireEvent(&quot;autosize&quot;,a);b.lastInputWidth=a}}},initAria:function(){this.callParent();this.getActionEl().dom.setAttribute(&quot;aria-required&quot;,this.allowBlank===false)},getBodyNaturalWidth:function(){return Math.round(this.size*6.5)+20}});Ext.define(&quot;Ext.layout.component.field.TextArea&quot;,{extend:&quot;Ext.layout.component.field.Text&quot;,alias:&quot;layout.textareafield&quot;,type:&quot;textareafield&quot;,adjustForGrow:function(a,j){var e=this,b=e.owner,h,g,f,d,c,i,k=[a,j];if(b.grow){h=b.inputEl;d=h.getWidth(true);c=h.getHeight();g=h.dom.value||&quot;&amp;#160;&quot;;g+=b.growAppend;g=g.replace(/\n/g,&quot;&lt;br&gt;&quot;);i=Ext.util.TextMetrics.measure(h,g,d).height+h.getBorderWidth(&quot;tb&quot;)+h.getPadding(&quot;tb&quot;);f=b.growMax;if(Ext.isNumber(j)){f=Math.min(f,j)}k[1]=Ext.Number.constrain(i,b.growMin,f)}return k}});Ext.define(&quot;Ext.form.field.TextArea&quot;,{extend:&quot;Ext.form.field.Text&quot;,alias:[&quot;widget.textareafield&quot;,&quot;widget.textarea&quot;],alternateClassName:&quot;Ext.form.TextArea&quot;,requires:[&quot;Ext.XTemplate&quot;,&quot;Ext.layout.component.field.TextArea&quot;],fieldSubTpl:['&lt;textarea id=&quot;{id}&quot; ','&lt;tpl if=&quot;name&quot;&gt;name=&quot;{name}&quot; &lt;/tpl&gt;','&lt;tpl if=&quot;rows&quot;&gt;rows=&quot;{rows}&quot; &lt;/tpl&gt;','&lt;tpl if=&quot;cols&quot;&gt;cols=&quot;{cols}&quot; &lt;/tpl&gt;','&lt;tpl if=&quot;tabIdx&quot;&gt;tabIndex=&quot;{tabIdx}&quot; &lt;/tpl&gt;','class=&quot;{fieldCls} {typeCls}&quot; ','autocomplete=&quot;off&quot;&gt;',&quot;&lt;/textarea&gt;&quot;,{compiled:true,disableFormats:true}],growMin:60,growMax:1000,growAppend:&quot;\n-&quot;,cols:20,rows:4,enterIsSpecial:false,preventScrollbars:false,componentLayout:&quot;textareafield&quot;,onRender:function(b,a){var c=this;Ext.applyIf(c.subTplData,{cols:c.cols,rows:c.rows});c.callParent(arguments)},afterRender:function(){var a=this;a.callParent(arguments);if(a.grow){if(a.preventScrollbars){a.inputEl.setStyle(&quot;overflow&quot;,&quot;hidden&quot;)}a.inputEl.setHeight(a.growMin)}},fireKey:function(a){if(a.isSpecialKey()&amp;&amp;(this.enterIsSpecial||(a.getKey()!==a.ENTER||a.hasModifier()))){this.fireEvent(&quot;specialkey&quot;,this,a)}},autoSize:function(){var b=this,a;if(b.grow&amp;&amp;b.rendered){b.doComponentLayout();a=b.inputEl.getHeight();if(a!==b.lastInputHeight){b.fireEvent(&quot;autosize&quot;,a);b.lastInputHeight=a}}},initAria:function(){this.callParent(arguments);this.getActionEl().dom.setAttribute(&quot;aria-multiline&quot;,true)},getBodyNaturalWidth:function(){return Math.round(this.cols*6.5)+20}});Ext.define(&quot;Ext.window.MessageBox&quot;,{extend:&quot;Ext.window.Window&quot;,requires:[&quot;Ext.toolbar.Toolbar&quot;,&quot;Ext.form.field.Text&quot;,&quot;Ext.form.field.TextArea&quot;,&quot;Ext.button.Button&quot;,&quot;Ext.layout.container.Anchor&quot;,&quot;Ext.layout.container.HBox&quot;,&quot;Ext.ProgressBar&quot;],alias:&quot;widget.messagebox&quot;,OK:1,YES:2,NO:4,CANCEL:8,OKCANCEL:9,YESNO:6,YESNOCANCEL:14,INFO:&quot;ext-mb-info&quot;,WARNING:&quot;ext-mb-warning&quot;,QUESTION:&quot;ext-mb-question&quot;,ERROR:&quot;ext-mb-error&quot;,hideMode:&quot;offsets&quot;,closeAction:&quot;hide&quot;,resizable:false,title:&quot;&amp;#160;&quot;,width:600,height:500,minWidth:250,maxWidth:600,minHeight:110,maxHeight:500,constrain:true,cls:Ext.baseCSSPrefix+&quot;message-box&quot;,layout:{type:&quot;anchor&quot;},defaultTextHeight:75,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:&quot;OK&quot;,yes:&quot;Yes&quot;,no:&quot;No&quot;,cancel:&quot;Cancel&quot;},buttonIds:[&quot;ok&quot;,&quot;yes&quot;,&quot;no&quot;,&quot;cancel&quot;],titleText:{confirm:&quot;Confirm&quot;,prompt:&quot;Prompt&quot;,wait:&quot;Loading...&quot;,alert:&quot;Attention&quot;},iconHeight:35,makeButton:function(a){var b=this.buttonIds[a];return Ext.create(&quot;Ext.button.Button&quot;,{handler:this.btnCallback,itemId:b,scope:this,text:this.buttonText[b],minWidth:75})},btnCallback:function(a){var b=this,c,d;if(b.cfg.prompt||b.cfg.multiline){if(b.cfg.multiline){d=b.textArea}else{d=b.textField}c=d.getValue();d.reset()}a.blur();b.hide();b.userCallback(a.itemId,c,b.cfg)},hide:function(){var a=this;a.dd.endDrag();a.progressBar.reset();a.removeCls(a.cfg.cls);a.callParent()},initComponent:function(){var c=this,b,a;c.title=&quot;&amp;#160;&quot;;c.topContainer=Ext.create(&quot;Ext.container.Container&quot;,{anchor:&quot;100%&quot;,style:{padding:&quot;10px&quot;,overflow:&quot;hidden&quot;},items:[c.iconComponent=Ext.create(&quot;Ext.Component&quot;,{cls:&quot;ext-mb-icon&quot;,width:50,height:c.iconHeight,style:{&quot;float&quot;:&quot;left&quot;}}),c.promptContainer=Ext.create(&quot;Ext.container.Container&quot;,{layout:{type:&quot;anchor&quot;},items:[c.msg=Ext.create(&quot;Ext.Component&quot;,{autoEl:{tag:&quot;span&quot;},cls:&quot;ext-mb-text&quot;}),c.textField=Ext.create(&quot;Ext.form.field.Text&quot;,{anchor:&quot;100%&quot;,enableKeyEvents:true,listeners:{keydown:c.onPromptKey,scope:c}}),c.textArea=Ext.create(&quot;Ext.form.field.TextArea&quot;,{anchor:&quot;100%&quot;,height:75})]})]});c.progressBar=Ext.create(&quot;Ext.ProgressBar&quot;,{anchor:&quot;-10&quot;,style:&quot;margin-left:10px&quot;});c.items=[c.topContainer,c.progressBar];c.msgButtons=[];for(b=0;b&lt;4;b++){a=c.makeButton(b);c.msgButtons[a.itemId]=a;c.msgButtons.push(a)}c.bottomTb=Ext.create(&quot;Ext.toolbar.Toolbar&quot;,{ui:&quot;footer&quot;,dock:&quot;bottom&quot;,layout:{pack:&quot;center&quot;},items:[c.msgButtons[0],c.msgButtons[1],c.msgButtons[2],c.msgButtons[3]]});c.dockedItems=[c.bottomTb];c.callParent()},onPromptKey:function(a,c){var b=this,d;if(c.keyCode===Ext.EventObject.RETURN||c.keyCode===10){if(b.msgButtons.ok.isVisible()){d=true;b.msgButtons.ok.handler.call(b,b.msgButtons.ok)}else{if(b.msgButtons.yes.isVisible()){b.msgButtons.yes.handler.call(b,b.msgButtons.yes);d=true}}if(d){b.textField.blur()}}},reconfigure:function(a){var d=this,c=a.buttons||0,f=true,e=d.maxWidth,b;a=a||{};d.cfg=a;if(a.width){e=a.width}delete d.defaultFocus;d.animateTarget=a.animateTarget||undefined;d.modal=a.modal!==false;if(a.title){d.setTitle(a.title||&quot;&amp;#160;&quot;)}if(!d.rendered){d.width=e;d.render(Ext.getBody())}else{d.setSize(e,d.maxHeight)}d.setPosition(-10000,-10000);d.closable=a.closable&amp;&amp;!a.wait;d.header.child(&quot;[type=close]&quot;).setVisible(a.closable!==false);if(!a.title&amp;&amp;!d.closable){d.header.hide()}else{d.header.show()}d.liveDrag=!a.proxyDrag;d.userCallback=Ext.Function.bind(a.callback||a.fn||Ext.emptyFn,a.scope||Ext.global);d.setIcon(a.icon);if(a.msg){d.msg.update(a.msg);d.msg.show()}else{d.msg.hide()}if(a.prompt||a.multiline){d.multiline=a.multiline;if(a.multiline){d.textArea.setValue(a.value);d.textArea.setHeight(a.defaultTextHeight||d.defaultTextHeight);d.textArea.show();d.textField.hide();d.defaultFocus=d.textArea}else{d.textField.setValue(a.value);d.textArea.hide();d.textField.show();d.defaultFocus=d.textField}}else{d.textArea.hide();d.textField.hide()}if(a.progress||a.wait){d.progressBar.show();d.updateProgress(0,a.progressText);if(a.wait===true){d.progressBar.wait(a.waitConfig)}}else{d.progressBar.hide()}for(b=0;b&lt;4;b++){if(c&amp;Math.pow(2,b)){if(!d.defaultFocus){d.defaultFocus=d.msgButtons[b]}d.msgButtons[b].show();f=false}else{d.msgButtons[b].hide()}}if(f){d.bottomTb.hide()}else{d.bottomTb.show()}},show:function(a){var b=this;b.reconfigure(a);b.addCls(a.cls);if(a.animateTarget){b.doAutoSize(true);b.callParent()}else{b.callParent();b.doAutoSize(true)}return b},afterShow:function(){if(this.animateTarget){this.center()}this.callParent(arguments)},doAutoSize:function(b){var e=this,d=e.iconComponent,f=e.iconHeight;if(!Ext.isDefined(e.frameWidth)){e.frameWidth=e.el.getWidth()-e.body.getWidth()}d.setHeight(f);e.minWidth=e.cfg.minWidth||Ext.getClass(this).prototype.minWidth;e.topContainer.doLayout();if(Ext.isIE6||Ext.isIEQuirks){e.textField.setCalculatedSize(9);e.textArea.setCalculatedSize(9)}var c=e.cfg.width||e.msg.getWidth()+d.getWidth()+25,a=(e.header.rendered?e.header.getHeight():0)+Math.max(e.promptContainer.getHeight(),d.getHeight())+e.progressBar.getHeight()+(e.bottomTb.rendered?e.bottomTb.getHeight():0)+20;d.setHeight(Math.max(f,e.msg.getHeight()));e.setSize(c+e.frameWidth,a+e.frameWidth);if(b){e.center()}return e},updateText:function(a){this.msg.update(a);return this.doAutoSize(true)},setIcon:function(a){var b=this;b.iconComponent.removeCls(b.iconCls);if(a){b.iconComponent.show();b.iconComponent.addCls(Ext.baseCSSPrefix+&quot;dlg-icon&quot;);b.iconComponent.addCls(b.iconCls=a)}else{b.iconComponent.removeCls(Ext.baseCSSPrefix+&quot;dlg-icon&quot;);b.iconComponent.hide()}return b},updateProgress:function(b,a,c){this.progressBar.updateProgress(b,a);if(c){this.updateText(c)}return this},onEsc:function(){if(this.closable!==false){this.callParent(arguments)}},confirm:function(a,d,c,b){if(Ext.isString(a)){a={title:a,icon:&quot;ext-mb-question&quot;,msg:d,buttons:this.YESNO,callback:c,scope:b}}return this.show(a)},prompt:function(b,f,d,c,a,e){if(Ext.isString(b)){b={prompt:true,title:b,minWidth:this.minPromptWidth,msg:f,buttons:this.OKCANCEL,callback:d,scope:c,multiline:a,value:e}}return this.show(b)},wait:function(a,c,b){if(Ext.isString(a)){a={title:c,msg:a,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:b}}return this.show(a)},alert:function(a,d,c,b){if(Ext.isString(a)){a={title:a,msg:d,buttons:this.OK,fn:c,scope:b,minWidth:this.minWidth}}return this.show(a)},progress:function(a,c,b){if(Ext.isString(a)){a={title:a,msg:c,progress:true,progressText:b}}return this.show(a)}},function(){Ext.MessageBox=Ext.Msg=new this()});Ext.define(&quot;Ext.form.Basic&quot;,{extend:&quot;Ext.util.Observable&quot;,alternateClassName:&quot;Ext.form.BasicForm&quot;,requires:[&quot;Ext.util.MixedCollection&quot;,&quot;Ext.form.action.Load&quot;,&quot;Ext.form.action.Submit&quot;,&quot;Ext.window.MessageBox&quot;,&quot;Ext.data.Errors&quot;,&quot;Ext.util.DelayedTask&quot;],constructor:function(a,b){var c=this,d=c.onItemAddOrRemove;c.owner=a;c.mon(a,{add:d,remove:d,scope:c});Ext.apply(c,b);if(Ext.isString(c.paramOrder)){c.paramOrder=c.paramOrder.split(/[\s,|]/)}c.checkValidityTask=Ext.create(&quot;Ext.util.DelayedTask&quot;,c.checkValidity,c);c.addEvents(&quot;beforeaction&quot;,&quot;actionfailed&quot;,&quot;actioncomplete&quot;,&quot;validitychange&quot;,&quot;dirtychange&quot;);c.callParent()},initialize:function(){this.initialized=true;this.onValidityChange(!this.hasInvalidField())},timeout:30,paramsAsHash:false,waitTitle:&quot;Please Wait...&quot;,trackResetOnLoad:false,wasDirty:false,destroy:function(){this.clearListeners();this.checkValidityTask.cancel()},onItemAddOrRemove:function(c,f){var d=this,e=!!f.ownerCt,b=f.isContainer;function a(g){d[e?&quot;mon&quot;:&quot;mun&quot;](g,{validitychange:d.checkValidity,dirtychange:d.checkDirty,scope:d,buffer:100});delete d._fields}if(f.isFormField){a(f)}else{if(b){if(f.isDestroyed){delete d._fields}else{Ext.Array.forEach(f.query(&quot;[isFormField]&quot;),a)}}}delete this._boundItems;if(d.initialized){d.checkValidityTask.delay(10)}},getFields:function(){var a=this._fields;if(!a){a=this._fields=Ext.create(&quot;Ext.util.MixedCollection&quot;);a.addAll(this.owner.query(&quot;[isFormField]&quot;))}return a},getBoundItems:function(){var a=this._boundItems;if(!a||a.getCount()===0){a=this._boundItems=Ext.create(&quot;Ext.util.MixedCollection&quot;);a.addAll(this.owner.query(&quot;[formBind]&quot;))}return a},hasInvalidField:function(){return !!this.getFields().findBy(function(c){var a=c.preventMark,b;c.preventMark=true;b=c.isValid();c.preventMark=a;return !b})},isValid:function(){var a=this,b;a.batchLayouts(function(){b=a.getFields().filterBy(function(c){return !c.validate()})});return b.length&lt;1},checkValidity:function(){var b=this,a=!b.hasInvalidField();if(a!==b.wasValid){b.onValidityChange(a);b.fireEvent(&quot;validitychange&quot;,b,a);b.wasValid=a}},onValidityChange:function(b){var a=this.getBoundItems();if(a){a.each(function(c){if(c.disabled===b){c.setDisabled(!b)}})}},isDirty:function(){return !!this.getFields().findBy(function(a){return a.isDirty()})},checkDirty:function(){var a=this.isDirty();if(a!==this.wasDirty){this.fireEvent(&quot;dirtychange&quot;,this,a);this.wasDirty=a}},hasUpload:function(){return !!this.getFields().findBy(function(a){return a.isFileUpload()})},doAction:function(b,a){if(Ext.isString(b)){b=Ext.ClassManager.instantiateByAlias(&quot;formaction.&quot;+b,Ext.apply({},a,{form:this}))}if(this.fireEvent(&quot;beforeaction&quot;,this,b)!==false){this.beforeAction(b);Ext.defer(b.run,100,b)}return this},submit:function(a){return this.doAction(this.standardSubmit?&quot;standardsubmit&quot;:this.api?&quot;directsubmit&quot;:&quot;submit&quot;,a)},load:function(a){return this.doAction(this.api?&quot;directload&quot;:&quot;load&quot;,a)},updateRecord:function(b){var a=b.fields,c=this.getFieldValues(),d,e={};a.each(function(g){d=g.name;if(d in c){e[d]=c[d]}});b.beginEdit();b.set(e);b.endEdit();return this},loadRecord:function(a){this._record=a;return this.setValues(a.data)},getRecord:function(){return this._record},beforeAction:function(c){var a=c.waitMsg,b=Ext.baseCSSPrefix+&quot;mask-loading&quot;,d;this.getFields().each(function(e){if(e.isFormField&amp;&amp;e.syncValue){e.syncValue()}});if(a){d=this.waitMsgTarget;if(d===true){this.owner.el.mask(a,b)}else{if(d){d=this.waitMsgTarget=Ext.get(d);d.mask(a,b)}else{Ext.MessageBox.wait(a,c.waitTitle||this.waitTitle)}}}},afterAction:function(b,d){if(b.waitMsg){var a=Ext.MessageBox,c=this.waitMsgTarget;if(c===true){this.owner.el.unmask()}else{if(c){c.unmask()}else{a.updateProgress(1);a.hide()}}}if(d){if(b.reset){this.reset()}Ext.callback(b.success,b.scope||b,[this,b]);this.fireEvent(&quot;actioncomplete&quot;,this,b)}else{Ext.callback(b.failure,b.scope||b,[this,b]);this.fireEvent(&quot;actionfailed&quot;,this,b)}},findField:function(a){return this.getFields().findBy(function(b){return b.id===a||b.getName()===a})},markInvalid:function(c){var a=this;function b(d,f){var e=a.findField(d);if(e){e.markInvalid(f)}}if(Ext.isArray(c)){Ext.each(c,function(d){b(d.id,d.msg)})}else{if(c instanceof Ext.data.Errors){c.each(function(d){b(d.field,d.message)})}else{Ext.iterate(c,b)}}return this},setValues:function(a){var b=this;function c(d,f){var e=b.findField(d);if(e){e.setValue(f);if(b.trackResetOnLoad){e.resetOriginalValue()}}}if(Ext.isArray(a)){Ext.each(a,function(d){c(d.id,d.value)})}else{Ext.iterate(a,c)}return this},getValues:function(e,b,d,a){var c={};this.getFields().each(function(g){if(!b||g.isDirty()){var f=g[a?&quot;getModelData&quot;:&quot;getSubmitData&quot;](d);if(Ext.isObject(f)){Ext.iterate(f,function(i,j){if(d&amp;&amp;j===&quot;&quot;){j=g.emptyText||&quot;&quot;}if(i in c){var k=c[i],h=Ext.isArray;if(!h(k)){k=c[i]=[k]}if(h(j)){c[i]=k.concat(j)}else{k.push(j)}}else{c[i]=j}})}}});if(e){c=Ext.Object.toQueryString(c)}return c},getFieldValues:function(a){return this.getValues(false,a,false,true)},clearInvalid:function(){var a=this;a.batchLayouts(function(){a.getFields().each(function(b){b.clearInvalid()})});return a},reset:function(){var a=this;a.batchLayouts(function(){a.getFields().each(function(b){b.reset()})});return a},applyToFields:function(a){this.getFields().each(function(b){Ext.apply(b,a)});return this},applyIfToFields:function(a){this.getFields().each(function(b){Ext.applyIf(b,a)});return this},batchLayouts:function(b){var c=this,a=new Ext.util.HashMap();c.getFields().each(function(e){var d=e.ownerCt;if(!a.contains(d)){a.add(d);d.oldSuspendLayout=d.suspendLayout;d.suspendLayout=true}});b();a.each(function(e,d){d.suspendLayout=d.oldSuspendLayout;delete d.oldSuspendLayout});c.owner.doComponentLayout()}});Ext.define(&quot;Ext.form.Panel&quot;,{extend:&quot;Ext.panel.Panel&quot;,mixins:{fieldAncestor:&quot;Ext.form.FieldAncestor&quot;},alias:&quot;widget.form&quot;,alternateClassName:[&quot;Ext.FormPanel&quot;,&quot;Ext.form.FormPanel&quot;],requires:[&quot;Ext.form.Basic&quot;,&quot;Ext.util.TaskRunner&quot;],layout:&quot;anchor&quot;,ariaRole:&quot;form&quot;,initComponent:function(){var a=this;if(a.frame){a.border=false}a.initFieldAncestor();a.callParent();a.relayEvents(a.form,[&quot;beforeaction&quot;,&quot;actionfailed&quot;,&quot;actioncomplete&quot;,&quot;validitychange&quot;,&quot;dirtychange&quot;]);if(a.pollForChanges){a.startPolling(a.pollInterval||500)}},initItems:function(){var a=this;a.form=a.createForm();a.callParent();a.form.initialize()},createForm:function(){return Ext.create(&quot;Ext.form.Basic&quot;,this,Ext.applyIf({listeners:{}},this.initialConfig))},getForm:function(){return this.form},loadRecord:function(a){return this.getForm().loadRecord(a)},getRecord:function(){return this.getForm().getRecord()},getValues:function(){return this.getForm().getValues()},beforeDestroy:function(){this.stopPolling();this.form.destroy();this.callParent()},load:function(a){this.form.load(a)},submit:function(a){this.form.submit(a)},disable:function(a){this.callParent(arguments);this.form.getFields().each(function(b){b.disable()})},enable:function(a){this.callParent(arguments);this.form.getFields().each(function(b){b.enable()})},startPolling:function(b){this.stopPolling();var a=Ext.create(&quot;Ext.util.TaskRunner&quot;,b);a.start({interval:0,run:this.checkChange,scope:this});this.pollTask=a},stopPolling:function(){var a=this.pollTask;if(a){a.stopAll();delete this.pollTask}},checkChange:function(){this.form.getFields().each(function(a){a.checkChange()})}});Ext.define(&quot;AM.view.user.Edit&quot;,{extend:&quot;Ext.window.Window&quot;,alias:&quot;widget.useredit&quot;,requires:[&quot;Ext.form.Panel&quot;],title:&quot;Edit User&quot;,layout:&quot;fit&quot;,autoShow:true,height:120,width:280,initComponent:function(){this.items=[{xtype:&quot;form&quot;,padding:&quot;5 5 0 5&quot;,border:false,style:&quot;background-color: #fff;&quot;,items:[{xtype:&quot;textfield&quot;,name:&quot;name&quot;,fieldLabel:&quot;Name&quot;},{xtype:&quot;textfield&quot;,name:&quot;email&quot;,fieldLabel:&quot;Email&quot;}]}];this.buttons=[{text:&quot;Save&quot;,action:&quot;save&quot;},{text:&quot;Cancel&quot;,scope:this,handler:this.close}];this.callParent(arguments)}});Ext.define(&quot;Ext.selection.DataViewModel&quot;,{extend:&quot;Ext.selection.Model&quot;,requires:[&quot;Ext.util.KeyNav&quot;],deselectOnContainerClick:true,enableKeyNav:true,constructor:function(a){this.addEvents(&quot;beforedeselect&quot;,&quot;beforeselect&quot;,&quot;deselect&quot;,&quot;select&quot;);this.callParent(arguments)},bindComponent:function(a){var b=this,c={refresh:b.refresh,scope:b};b.view=a;b.bind(a.getStore());a.on(a.triggerEvent,b.onItemClick,b);a.on(a.triggerCtEvent,b.onContainerClick,b);a.on(c);if(b.enableKeyNav){b.initKeyNav(a)}},onItemClick:function(b,a,d,c,f){this.selectWithEvent(a,f)},onContainerClick:function(){if(this.deselectOnContainerClick){this.deselectAll()}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on(&quot;render&quot;,Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=Ext.create(&quot;Ext.util.KeyNav&quot;,a.el,{down:Ext.pass(b.onNavKey,[1],b),right:Ext.pass(b.onNavKey,[1],b),left:Ext.pass(b.onNavKey,[-1],b),up:Ext.pass(b.onNavKey,[-1],b),scope:b})},onNavKey:function(f){f=f||1;var e=this,b=e.view,d=e.getSelection()[0],c=e.view.store.getCount(),a;if(d){a=b.indexOf(b.getNode(d))+f}else{a=0}if(a&lt;0){a=c-1}else{if(a&gt;=c){a=0}}e.select(a)},onSelectChange:function(b,e,d,g){var f=this,a=f.view,c=e?&quot;select&quot;:&quot;deselect&quot;;if((d||f.fireEvent(&quot;before&quot;+c,f,b))!==false&amp;&amp;g()!==false){if(e){a.onItemSelect(b)}else{a.onItemDeselect(b)}if(!d){f.fireEvent(c,f,b)}}},destroy:function(){Ext.destroy(this.keyNav);this.callParent()}});Ext.define(&quot;Ext.view.AbstractView&quot;,{extend:&quot;Ext.Component&quot;,alternateClassName:&quot;Ext.view.AbstractView&quot;,requires:[&quot;Ext.LoadMask&quot;,&quot;Ext.data.StoreManager&quot;,&quot;Ext.CompositeElementLite&quot;,&quot;Ext.DomQuery&quot;,&quot;Ext.selection.DataViewModel&quot;],inheritableStatics:{getRecord:function(a){return this.getBoundView(a).getRecord(a)},getBoundView:function(a){return Ext.getCmp(a.boundView)}},deferInitialRefresh:true,itemCls:Ext.baseCSSPrefix+&quot;dataview-item&quot;,loadingText:&quot;Loading...&quot;,loadMask:true,loadingUseMsg:true,selectedItemCls:Ext.baseCSSPrefix+&quot;item-selected&quot;,emptyText:&quot;&quot;,deferEmptyText:true,trackOver:false,blockRefresh:false,last:false,triggerEvent:&quot;itemclick&quot;,triggerCtEvent:&quot;containerclick&quot;,addCmpEvents:function(){},initComponent:function(){var c=this,a=Ext.isDefined,d=c.itemTpl,b={};if(d){if(Ext.isArray(d)){d=d.join(&quot;&quot;)}else{if(Ext.isObject(d)){b=Ext.apply(b,d.initialConfig);d=d.html}}if(!c.itemSelector){c.itemSelector=&quot;.&quot;+c.itemCls}d=Ext.String.format('&lt;tpl for=&quot;.&quot;&gt;&lt;div class=&quot;{0}&quot;&gt;{1}&lt;/div&gt;&lt;/tpl&gt;',c.itemCls,d);c.tpl=Ext.create(&quot;Ext.XTemplate&quot;,d,b)}c.callParent();if(Ext.isString(c.tpl)||Ext.isArray(c.tpl)){c.tpl=Ext.create(&quot;Ext.XTemplate&quot;,c.tpl)}c.addEvents(&quot;beforerefresh&quot;,&quot;refresh&quot;,&quot;viewready&quot;,&quot;itemupdate&quot;,&quot;itemadd&quot;,&quot;itemremove&quot;);c.addCmpEvents();c.store=Ext.data.StoreManager.lookup(c.store||&quot;ext-empty-store&quot;);c.all=new Ext.CompositeElementLite()},onRender:function(){var c=this,b=c.loadMask,a={msg:c.loadingText,msgCls:c.loadingCls,useMsg:c.loadingUseMsg};c.callParent(arguments);if(b){if(Ext.isObject(b)){a=Ext.apply(a,b)}c.loadMask=Ext.create(&quot;Ext.LoadMask&quot;,c,a);c.loadMask.on({scope:c,beforeshow:c.onMaskBeforeShow,hide:c.onMaskHide})}},onMaskBeforeShow:function(){var a=this.loadingHeight;this.getSelectionModel().deselectAll();if(a){this.setCalculatedSize(undefined,a)}},onMaskHide:function(){var a=this;if(!a.destroying&amp;&amp;a.loadingHeight){a.setHeight(a.height)}},afterRender:function(){this.callParent(arguments);this.getSelectionModel().bindComponent(this)},getSelectionModel:function(){var a=this,b=&quot;SINGLE&quot;;if(!a.selModel){a.selModel={}}if(a.simpleSelect){b=&quot;SIMPLE&quot;}else{if(a.multiSelect){b=&quot;MULTI&quot;}}Ext.applyIf(a.selModel,{allowDeselect:a.allowDeselect,mode:b});if(!a.selModel.events){a.selModel=Ext.create(&quot;Ext.selection.DataViewModel&quot;,a.selModel)}if(!a.selModel.hasRelaySetup){a.relayEvents(a.selModel,[&quot;selectionchange&quot;,&quot;beforeselect&quot;,&quot;beforedeselect&quot;,&quot;select&quot;,&quot;deselect&quot;]);a.selModel.hasRelaySetup=true}if(a.disableSelection){a.selModel.locked=true}return a.selModel},refresh:function(){var c=this,b,a;if(!c.rendered||c.isDestroyed){return}c.fireEvent(&quot;beforerefresh&quot;,c);b=c.getTargetEl();a=c.store.getRange();b.update(&quot;&quot;);if(a.length&lt;1){if(!c.deferEmptyText||c.hasSkippedEmptyText){b.update(c.emptyText)}c.all.clear()}else{c.tpl.overwrite(b,c.collectData(a,0));c.all.fill(Ext.query(c.getItemSelector(),b.dom));c.updateIndexes(0)}c.selModel.refresh();c.hasSkippedEmptyText=true;c.fireEvent(&quot;refresh&quot;,c);if(!c.viewReady){c.viewReady=true;c.fireEvent(&quot;viewready&quot;,c)}},prepareData:function(c,b,a){if(a){Ext.apply(c,a.getAssociatedData())}return c},collectData:function(c,f){var e=[],d=0,a=c.length,b;for(;d&lt;a;d++){b=c[d];e[e.length]=this.prepareData(b[b.persistenceProperty],f+d,b)}return e},bufferRender:function(a,b){var c=document.createElement(&quot;div&quot;);this.tpl.overwrite(c,this.collectData(a,b));return Ext.query(this.getItemSelector(),c)},onUpdate:function(e,a){var d=this,b=d.store.indexOf(a),c;if(b&gt;-1){c=d.bufferRender([a],b)[0];if(d.getNode(a)){d.all.replaceElement(b,c,true);d.updateIndexes(b,b);d.selModel.refresh();d.fireEvent(&quot;itemupdate&quot;,a,b,c)}}},onAdd:function(e,b,c){var d=this,a;if(d.all.getCount()===0){d.refresh();return}a=d.bufferRender(b,c);d.doAdd(a,b,c);d.selModel.refresh();d.updateIndexes(c);d.fireEvent(&quot;itemadd&quot;,b,c,a)},doAdd:function(b,a,c){var d=this.all;if(c&lt;d.getCount()){d.item(c).insertSibling(b,&quot;before&quot;,true)}else{d.last().insertSibling(b,&quot;after&quot;,true)}Ext.Array.insert(d.elements,c,b)},onRemove:function(d,a,b){var c=this;c.doRemove(a,b);c.updateIndexes(b);if(c.store.getCount()===0){c.refresh()}c.fireEvent(&quot;itemremove&quot;,a,b)},doRemove:function(a,b){this.all.removeElement(b,true)},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(e,d){var c=this.all.elements,a=this.store.getRange(),b;e=e||0;d=d||((d===0)?0:(c.length-1));for(b=e;b&lt;=d;b++){c[b].viewIndex=b;c[b].viewRecordId=a[b].internalId;if(!c[b].boundView){c[b].boundView=this.id}}},getStore:function(){return this.store},bindStore:function(a,b){var d=this,c;if(!b&amp;&amp;d.store){if(a!==d.store&amp;&amp;d.store.autoDestroy){d.store.destroyStore()}else{d.mun(d.store,{scope:d,datachanged:d.onDataChanged,add:d.onAdd,remove:d.onRemove,update:d.onUpdate,clear:d.refresh})}if(!a){if(d.loadMask&amp;&amp;d.loadMask.bindStore){d.loadMask.bindStore(null)}d.store=null}}if(a){a=Ext.data.StoreManager.lookup(a);d.mon(a,{scope:d,datachanged:d.onDataChanged,add:d.onAdd,remove:d.onRemove,update:d.onUpdate,clear:d.refresh});if(d.loadMask&amp;&amp;d.loadMask.bindStore){if(Ext.Array.contains(a.alias,&quot;store.node&quot;)){c=this.ownerCt.store}else{c=a}d.loadMask.bindStore(c)}}d.viewReady=false;d.store=a;d.getSelectionModel().bind(a);if(a){if(b&amp;&amp;d.deferInitialRefresh){Ext.Function.defer(function(){if(!d.isDestroyed){d.refresh(true)}},1)}else{d.refresh(true)}}},onDataChanged:function(){if(this.blockRefresh!==true){this.refresh.apply(this,arguments)}},findItemByChild:function(a){return Ext.fly(a).findParent(this.getItemSelector(),this.getTargetEl())},findTargetByEvent:function(a){return a.getTarget(this.getItemSelector(),this.getTargetEl())},getSelectedNodes:function(){var b=[],a=this.selModel.getSelection(),d=a.length,c=0;for(;c&lt;d;c++){b.push(this.getNode(a[c]))}return b},getRecords:function(c){var b=[],d=0,a=c.length,e=this.store.data;for(;d&lt;a;d++){b[b.length]=e.getByKey(c[d].viewRecordId)}return b},getRecord:function(a){return this.store.data.getByKey(Ext.getDom(a).viewRecordId)},isSelected:function(b){var a=this.getRecord(b);return this.selModel.isSelected(a)},select:function(b,c,a){this.selModel.select(b,c,a)},deselect:function(b,a){this.selModel.deselect(b,a)},getNode:function(a){if(!this.rendered){return null}if(Ext.isString(a)){return document.getElementById(a)}if(Ext.isNumber(a)){return this.all.elements[a]}if(a instanceof Ext.data.Model){return this.getNodeByRecord(a)}return a},getNodeByRecord:function(a){var c=this.all.elements,d=c.length,b=0;for(;b&lt;d;b++){if(c[b].viewRecordId===a.internalId){return c[b]}}return null},getNodes:function(e,a){var d=this.all.elements,b=[],c;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;if(e&lt;=a){for(c=e;c&lt;=a&amp;&amp;d[c];c++){b.push(d[c])}}else{for(c=e;c&gt;=a&amp;&amp;d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onDestroy:function(){var a=this;a.all.clear();a.callParent();a.bindStore(null);a.selModel.destroy()},onItemSelect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).addCls(this.selectedItemCls)}},onItemDeselect:function(a){var b=this.getNode(a);if(b){Ext.fly(b).removeCls(this.selectedItemCls)}},getItemSelector:function(){return this.itemSelector}},function(){Ext.deprecate(&quot;extjs&quot;,&quot;4.0&quot;,function(){Ext.view.AbstractView.override({getSelectionCount:function(){if(Ext.global.console){Ext.global.console.warn(&quot;DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel&quot;)}return this.selModel.getSelection().length},getSelectedRecords:function(){if(Ext.global.console){Ext.global.console.warn(&quot;DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel&quot;)}return this.selModel.getSelection()},select:function(a,b,d){if(Ext.global.console){Ext.global.console.warn(&quot;DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()&quot;)}var c=this.getSelectionModel();return c.select.apply(c,arguments)},clearSelections:function(){if(Ext.global.console){Ext.global.console.warn(&quot;DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()&quot;)}var a=this.getSelectionModel();return a.deselectAll()}})})});Ext.define(&quot;Ext.view.View&quot;,{extend:&quot;Ext.view.AbstractView&quot;,alternateClassName:&quot;Ext.DataView&quot;,alias:&quot;widget.dataview&quot;,inheritableStatics:{EventMap:{mousedown:&quot;MouseDown&quot;,mouseup:&quot;MouseUp&quot;,click:&quot;Click&quot;,dblclick:&quot;DblClick&quot;,contextmenu:&quot;ContextMenu&quot;,mouseover:&quot;MouseOver&quot;,mouseout:&quot;MouseOut&quot;,mouseenter:&quot;MouseEnter&quot;,mouseleave:&quot;MouseLeave&quot;,keydown:&quot;KeyDown&quot;,focus:&quot;Focus&quot;}},addCmpEvents:function(){this.addEvents(&quot;beforeitemmousedown&quot;,&quot;beforeitemmouseup&quot;,&quot;beforeitemmouseenter&quot;,&quot;beforeitemmouseleave&quot;,&quot;beforeitemclick&quot;,&quot;beforeitemdblclick&quot;,&quot;beforeitemcontextmenu&quot;,&quot;beforeitemkeydown&quot;,&quot;itemmousedown&quot;,&quot;itemmouseup&quot;,&quot;itemmouseenter&quot;,&quot;itemmouseleave&quot;,&quot;itemclick&quot;,&quot;itemdblclick&quot;,&quot;itemcontextmenu&quot;,&quot;itemkeydown&quot;,&quot;beforecontainermousedown&quot;,&quot;beforecontainermouseup&quot;,&quot;beforecontainermouseover&quot;,&quot;beforecontainermouseout&quot;,&quot;beforecontainerclick&quot;,&quot;beforecontainerdblclick&quot;,&quot;beforecontainercontextmenu&quot;,&quot;beforecontainerkeydown&quot;,&quot;containermouseup&quot;,&quot;containermouseover&quot;,&quot;containermouseout&quot;,&quot;containerclick&quot;,&quot;containerdblclick&quot;,&quot;containercontextmenu&quot;,&quot;containerkeydown&quot;,&quot;selectionchange&quot;,&quot;beforeselect&quot;)},afterRender:function(){var b=this,a;b.callParent();a={scope:b,freezeEvent:true,click:b.handleEvent,mousedown:b.handleEvent,mouseup:b.handleEvent,dblclick:b.handleEvent,contextmenu:b.handleEvent,mouseover:b.handleEvent,mouseout:b.handleEvent,keydown:b.handleEvent};b.mon(b.getTargetEl(),a);if(b.store){b.bindStore(b.store,true)}},handleEvent:function(a){if(this.processUIEvent(a)!==false){this.processSpecialEvent(a)}},processItemEvent:Ext.emptyFn,processContainerEvent:Ext.emptyFn,processSpecialEvent:Ext.emptyFn,stillOverItem:function(b,a){var c;if(a&amp;&amp;typeof(a.offsetParent)===&quot;object&quot;){c=(b.type==&quot;mouseout&quot;)?b.getRelatedTarget():b.getTarget();return Ext.fly(a).contains(c)}return false},processUIEvent:function(g){var h=this,j=g.getTarget(h.getItemSelector(),h.getTargetEl()),a=this.statics().EventMap,f,c,i=g.type,d=h.mouseOverItem,b;if(!j){if(i==&quot;mouseover&quot;&amp;&amp;h.stillOverItem(g,d)){j=d}if(i==&quot;keydown&quot;){c=h.getSelectionModel().getLastSelected();if(c){j=h.getNode(c)}}}if(j){f=h.indexOf(j);if(!c){c=h.getRecord(j)}if(h.processItemEvent(c,j,f,g)===false){return false}b=h.isNewItemEvent(j,g);if(b===false){return false}if((h[&quot;onBeforeItem&quot;+a[b]](c,j,f,g)===false)||(h.fireEvent(&quot;beforeitem&quot;+b,h,c,j,f,g)===false)||(h[&quot;onItem&quot;+a[b]](c,j,f,g)===false)){return false}h.fireEvent(&quot;item&quot;+b,h,c,j,f,g)}else{if((h.processContainerEvent(g)===false)||(h[&quot;onBeforeContainer&quot;+a[i]](g)===false)||(h.fireEvent(&quot;beforecontainer&quot;+i,h,g)===false)||(h[&quot;onContainer&quot;+a[i]](g)===false)){return false}h.fireEvent(&quot;container&quot;+i,h,g)}return true},isNewItemEvent:function(d,f){var c=this,a=c.mouseOverItem,b=f.type;switch(b){case&quot;mouseover&quot;:if(d===a){return false}c.mouseOverItem=d;return&quot;mouseenter&quot;;case&quot;mouseout&quot;:if(c.stillOverItem(f,a)){return false}c.mouseOverItem=null;return&quot;mouseleave&quot;}return b},onItemMouseEnter:function(a,c,b,d){if(this.trackOver){this.highlightItem(c)}},onItemMouseLeave:function(a,c,b,d){if(this.trackOver){this.clearHighlight()}},onItemMouseDown:Ext.emptyFn,onItemMouseUp:Ext.emptyFn,onItemFocus:Ext.emptyFn,onItemClick:Ext.emptyFn,onItemDblClick:Ext.emptyFn,onItemContextMenu:Ext.emptyFn,onItemKeyDown:Ext.emptyFn,onBeforeItemMouseDown:Ext.emptyFn,onBeforeItemMouseUp:Ext.emptyFn,onBeforeItemFocus:Ext.emptyFn,onBeforeItemMouseEnter:Ext.emptyFn,onBeforeItemMouseLeave:Ext.emptyFn,onBeforeItemClick:Ext.emptyFn,onBeforeItemDblClick:Ext.emptyFn,onBeforeItemContextMenu:Ext.emptyFn,onBeforeItemKeyDown:Ext.emptyFn,onContainerMouseDown:Ext.emptyFn,onContainerMouseUp:Ext.emptyFn,onContainerMouseOver:Ext.emptyFn,onContainerMouseOut:Ext.emptyFn,onContainerClick:Ext.emptyFn,onContainerDblClick:Ext.emptyFn,onContainerContextMenu:Ext.emptyFn,onContainerKeyDown:Ext.emptyFn,onBeforeContainerMouseDown:Ext.emptyFn,onBeforeContainerMouseUp:Ext.emptyFn,onBeforeContainerMouseOver:Ext.emptyFn,onBeforeContainerMouseOut:Ext.emptyFn,onBeforeContainerClick:Ext.emptyFn,onBeforeContainerDblClick:Ext.emptyFn,onBeforeContainerContextMenu:Ext.emptyFn,onBeforeContainerKeyDown:Ext.emptyFn,highlightItem:function(b){var a=this;a.clearHighlight();a.highlightedItem=b;Ext.fly(b).addCls(a.overItemCls)},clearHighlight:function(){var b=this,a=b.highlightedItem;if(a){Ext.fly(a).removeCls(b.overItemCls);delete b.highlightedItem}},refresh:function(){var a=this;a.clearHighlight();a.callParent(arguments);if(!a.isFixedHeight()){a.doComponentLayout()}}});Ext.define(&quot;Ext.view.Table&quot;,{extend:&quot;Ext.view.View&quot;,alias:&quot;widget.tableview&quot;,uses:[&quot;Ext.view.TableChunker&quot;,&quot;Ext.util.DelayedTask&quot;,&quot;Ext.util.MixedCollection&quot;],baseCls:Ext.baseCSSPrefix+&quot;grid-view&quot;,itemSelector:&quot;.&quot;+Ext.baseCSSPrefix+&quot;grid-row&quot;,cellSelector:&quot;.&quot;+Ext.baseCSSPrefix+&quot;grid-cell&quot;,selectedItemCls:Ext.baseCSSPrefix+&quot;grid-row-selected&quot;,selectedCellCls:Ext.baseCSSPrefix+&quot;grid-cell-selected&quot;,focusedItemCls:Ext.baseCSSPrefix+&quot;grid-row-focused&quot;,overItemCls:Ext.baseCSSPrefix+&quot;grid-row-over&quot;,altRowCls:Ext.baseCSSPrefix+&quot;grid-row-alt&quot;,rowClsRe:/(?:^|\s*)grid-row-(first|last|alt)(?:\s+|$)/g,cellRe:new RegExp(&quot;x-grid-cell-([^\\s]+) &quot;,&quot;&quot;),trackOver:true,getRowClass:null,initComponent:function(){var a=this;a.scrollState={};a.selModel.view=a;a.headerCt.view=a;a.initFeatures();a.tpl=&quot;&lt;div&gt;&lt;/div&gt;&quot;;a.callParent();a.mon(a.store,{load:a.onStoreLoad,scope:a})},onStoreLoad:function(){var a=this;if(a.invalidateScrollerOnRefresh){if(Ext.isGecko){if(!a.scrollToTopTask){a.scrollToTopTask=Ext.create(&quot;Ext.util.DelayedTask&quot;,a.scrollToTop,a)}a.scrollToTopTask.delay(1)}else{a.scrollToTop()}}},scrollToTop:Ext.emptyFn,addElListener:function(a,c,b){this.mon(this,a,c,b,{element:&quot;el&quot;})},getGridColumns:function(){return this.headerCt.getGridColumns()},getHeaderAtIndex:function(a){return this.headerCt.getHeaderAtIndex(a)},getCell:function(a,b){var c=this.getNode(a);return Ext.fly(c).down(b.getCellSelector())},getFeature:function(b){var a=this.featuresMC;if(a){return a.get(b)}},initFeatures:function(){var d=this,b=0,c,a;d.features=d.features||[];c=d.features;a=c.length;d.featuresMC=Ext.create(&quot;Ext.util.MixedCollection&quot;);for(;b&lt;a;b++){if(!c[b].isFeature){c[b]=Ext.create(&quot;feature.&quot;+c[b].ftype,c[b])}c[b].view=d;d.featuresMC.add(c[b])}},attachEventsForFeatures:function(){var b=this.features,c=b.length,a=0;for(;a&lt;c;a++){if(b[a].isFeature){b[a].attachEvents()}}},afterRender:function(){var a=this;a.callParent();a.mon(a.el,{scroll:a.fireBodyScroll,scope:a});a.el.unselectable();a.attachEventsForFeatures()},fireBodyScroll:function(b,a){this.fireEvent(&quot;bodyscroll&quot;,b,a)},prepareData:function(c,j,e){var g=this,h=g.headerCt.prepareData(c,j,e,g,g.ownerCt),a=g.features,f=a.length,d=0,b,k;for(;d&lt;f;d++){k=a[d];if(k.isFeature){Ext.apply(h,k.getAdditionalData(c,j,e,h,g))}}return h},collectData:function(d,m){var n=this.callParent(arguments),c=this.headerCt,l=c.getFullWidth(),b=this.features,h=b.length,a={rows:n,fullWidth:l},f=0,p,e=0,k,g;k=n.length;if(this.getRowClass){for(;e&lt;k;e++){g={};n[e][&quot;rowCls&quot;]=this.getRowClass(d[e],e,g,this.store)}}for(;f&lt;h;f++){p=b[f];if(p.isFeature&amp;&amp;p.collectData&amp;&amp;!p.disabled){a=p.collectData(d,n,m,l,a);break}}return a},onHeaderResize:function(e,a,d){var c=this,b=c.el;if(b){c.saveScrollState();if(Ext.isIE6||Ext.isIE7){if(e.el.hasCls(Ext.baseCSSPrefix+&quot;column-header-first&quot;)){a+=1}}b.select(&quot;.&quot;+Ext.baseCSSPrefix+&quot;grid-col-resizer-&quot;+e.id).setWidth(a);b.select(&quot;.&quot;+Ext.baseCSSPrefix+&quot;grid-table-resizer&quot;).setWidth(c.headerCt.getFullWidth());c.restoreScrollState();if(!c.ignoreTemplate){c.setNewTemplate()}if(!d){c.el.focus()}}},onHeaderShow:function(c,d,b){var a=this;a.ignoreTemplate=true;if(d.oldWidth){a.onHeaderResize(d,d.oldWidth,b);delete d.oldWidth}else{if(d.width&amp;&amp;!d.flex){a.onHeaderResize(d,d.width,b)}}delete a.ignoreTemplate;a.setNewTemplate()},onHeaderHide:function(b,c,a){this.onHeaderResize(c,0,a)},setNewTemplate:function(){var b=this,a=b.headerCt.getColumnsForTpl(true);b.tpl=b.getTableChunker().getTableTpl({columns:a,features:b.features})},getTableChunker:function(){return this.chunker||Ext.view.TableChunker},addRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).addCls(a)}},removeRowCls:function(b,a){var c=this.getNode(b);if(c){Ext.fly(c).removeCls(a)}},onRowSelect:function(a){this.addRowCls(a,this.selectedItemCls)},onRowDeselect:function(b){var a=this;a.removeRowCls(b,a.selectedItemCls);a.removeRowCls(b,a.focusedItemCls)},onCellSelect:function(b){var a=this.getCellByPosition(b);if(a){a.addCls(this.selectedCellCls)}},onCellDeselect:function(b){var a=this.getCellByPosition(b);if(a){a.removeCls(this.selectedCellCls)}},onCellFocus:function(a){this.focusCell(a)},getCellByPosition:function(b){var g=b.row,e=b.column,d=this.store,f=this.getNode(g),h=this.headerCt.getHeaderAtIndex(e),c,a=false;if(h&amp;&amp;f){c=h.getCellSelector();a=Ext.fly(f).down(c)}return a},onRowFocus:function(d,b,a){var c=this,e=c.getNode(d);if(b){c.addRowCls(d,c.focusedItemCls);if(!a){c.focusRow(d)}}else{c.removeRowCls(d,c.focusedItemCls)}},focusRow:function(b){var f=this,i=f.getNode(b),c=f.el,g=0,a=f.ownerCt,h,d,e;if(i&amp;&amp;c){d=c.getRegion();h=Ext.fly(i).getRegion();if(h.top&lt;d.top){g=h.top-d.top}else{if(h.bottom&gt;d.bottom){g=h.bottom-d.bottom}}e=f.getRecord(i);b=f.store.indexOf(e);if(g){a.scrollByDeltaY(g)}f.fireEvent(&quot;rowfocus&quot;,e,i,b)}},focusCell:function(g){var i=this,j=i.getCellByPosition(g),b=i.el,d=0,e=0,c=b.getRegion(),a=i.ownerCt,h,f;if(j){h=j.getRegion();if(h.top&lt;c.top){d=h.top-c.top}else{if(h.bottom&gt;c.bottom){d=h.bottom-c.bottom}}if(h.left&lt;c.left){e=h.left-c.left}else{if(h.right&gt;c.right){e=h.right-c.right}}if(d){a.scrollByDeltaY(d)}if(e){a.scrollByDeltaX(e)}b.focus();i.fireEvent(&quot;cellfocus&quot;,f,j,g)}},scrollByDelta:function(c,b){b=b||&quot;scrollTop&quot;;var a=this.el.dom;a[b]=(a[b]+=c)},onUpdate:function(b,a){this.callParent(arguments)},saveScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState;a.left=b.scrollLeft;a.top=b.scrollTop}},restoreScrollState:function(){if(this.rendered){var b=this.el.dom,a=this.scrollState,c=this.headerCt.el.dom;c.scrollLeft=b.scrollLeft=a.left;b.scrollTop=a.top}},refresh:function(){this.setNewTemplate();this.callParent(arguments)},processItemEvent:function(b,l,i,d){var g=this,j=d.getTarget(g.cellSelector,l),h=j?j.cellIndex:-1,a=g.statics().EventMap,c=g.getSelectionModel(),f=d.type,k;if(f==&quot;keydown&quot;&amp;&amp;!j&amp;&amp;c.getCurrentPosition){j=g.getCellByPosition(c.getCurrentPosition());if(j){j=j.dom;h=j.cellIndex}}k=g.fireEvent(&quot;uievent&quot;,f,g,j,i,h,d);if(k===false||g.callParent(arguments)===false){return false}if(f==&quot;mouseover&quot;||f==&quot;mouseout&quot;){return true}return !((g[&quot;onBeforeCell&quot;+a[f]](j,h,b,l,i,d)===false)||(g.fireEvent(&quot;beforecell&quot;+f,g,j,h,b,l,i,d)===false)||(g[&quot;onCell&quot;+a[f]](j,h,b,l,i,d)===false)||(g.fireEvent(&quot;cell&quot;+f,g,j,h,b,l,i,d)===false))},processSpecialEvent:function(j){var m=this,b=m.statics().EventMap,d=m.features,l=d.length,n=j.type,f,o,g,h,c,k,a=m.ownerCt;m.callParent(arguments);if(n==&quot;mouseover&quot;||n==&quot;mouseout&quot;){return}for(f=0;f&lt;l;f++){o=d[f];if(o.hasFeatureEvent){h=j.getTarget(o.eventSelector,m.getTargetEl());if(h){g=o.eventPrefix;c=o.getFireEventArgs(&quot;before&quot;+g+n,m,h,j);k=o.getFireEventArgs(g+n,m,h,j);if((m.fireEvent.apply(m,c)===false)||(a.fireEvent.apply(a,c)===false)||(m.fireEvent.apply(m,k)===false)||(a.fireEvent.apply(a,k)===false)){return false}}}}return true},onCellMouseDown:Ext.emptyFn,onCellMouseUp:Ext.emptyFn,onCellClick:Ext.emptyFn,onCellDblClick:Ext.emptyFn,onCellContextMenu:Ext.emptyFn,onCellKeyDown:Ext.emptyFn,onBeforeCellMouseDown:Ext.emptyFn,onBeforeCellMouseUp:Ext.emptyFn,onBeforeCellClick:Ext.emptyFn,onBeforeCellDblClick:Ext.emptyFn,onBeforeCellContextMenu:Ext.emptyFn,onBeforeCellKeyDown:Ext.emptyFn,expandToFit:function(b){if(b){var a=this.getMaxContentWidth(b);delete b.flex;b.setWidth(a)}},getMaxContentWidth:function(g){var a=g.getCellInnerSelector(),c=this.el.query(a),d=0,f=c.length,e=g.el.dom.scrollWidth,b;for(;d&lt;f;d++){b=c[d].scrollWidth;if(b&gt;e){e=b}}return e},getPositionByEvent:function(f){var d=this,b=f.getTarget(d.cellSelector),c=f.getTarget(d.itemSelector),a=d.getRecord(c),g=d.getHeaderByCell(b);return d.getPosition(a,g)},getHeaderByCell:function(b){if(b){var a=b.className.match(this.cellRe);if(a&amp;&amp;a[1]){return Ext.getCmp(a[1])}}return false},walkCells:function(k,l,g,m,a,n){var i=this,o=k.row,d=k.column,j=i.store.getCount(),f=i.getFirstVisibleColumnIndex(),b=i.getLastVisibleColumnIndex(),h={row:o,column:d},c=i.headerCt.getHeaderAtIndex(d);if(!c||c.hidden){return false}g=g||{};l=l.toLowerCase();switch(l){case&quot;right&quot;:if(d===b){if(m||o===j-1){return false}if(!g.ctrlKey){h.row=o+1;h.column=f}}else{if(!g.ctrlKey){h.column=d+i.getRightGap(c)}else{h.column=b}}break;case&quot;left&quot;:if(d===f){if(m||o===0){return false}if(!g.ctrlKey){h.row=o-1;h.column=b}}else{if(!g.ctrlKey){h.column=d+i.getLeftGap(c)}else{h.column=f}}break;case&quot;up&quot;:if(o===0){return false}else{if(!g.ctrlKey){h.row=o-1}else{h.row=0}}break;case&quot;down&quot;:if(o===j-1){return false}else{if(!g.ctrlKey){h.row=o+1}else{h.row=j-1}}break}if(a&amp;&amp;a.call(n||window,h)!==true){return false}else{return h}},getFirstVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(&quot;:not([hidden])&quot;,a),b=d[0];return c.getHeaderIndex(b)},getLastVisibleColumnIndex:function(){var c=this.getHeaderCt(),a=c.getGridColumns(),d=Ext.ComponentQuery.query(&quot;:not([hidden])&quot;,a),b=d[d.length-1];return c.getHeaderIndex(b)},getHeaderCt:function(){return this.headerCt},getPosition:function(a,e){var d=this,b=d.store,c=d.headerCt.getGridColumns();return{row:b.indexOf(a),column:Ext.Array.indexOf(c,e)}},getRightGap:function(a){var f=this.getHeaderCt(),e=f.getGridColumns(),b=Ext.Array.indexOf(e,a),c=b+1,d;for(;c&lt;=e.length;c++){if(!e[c].hidden){d=c;break}}return d-b},beforeDestroy:function(){if(this.rendered){this.el.removeAllListeners()}this.callParent(arguments)},getLeftGap:function(a){var f=this.getHeaderCt(),e=f.getGridColumns(),c=Ext.Array.indexOf(e,a),d=c-1,b;for(;d&gt;=0;d--){if(!e[d].hidden){b=d;break}}return b-c}});Ext.define(&quot;Ext.grid.View&quot;,{extend:&quot;Ext.view.Table&quot;,alias:&quot;widget.gridview&quot;,stripeRows:true,invalidateScrollerOnRefresh:true,scrollToTop:function(){if(this.rendered){var b=this.ownerCt,a=b.verticalScroller;if(a){a.scrollToTop()}}},onAdd:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onRemove:function(c,a,b){this.callParent(arguments);this.doStripeRows(b)},onUpdate:function(d,a,b){var c=d.indexOf(a);this.callParent(arguments);this.doStripeRows(c,c)},doStripeRows:function(b,a){if(this.stripeRows){var d=this.getNodes(b,a),f=d.length,c=0,e;for(;c&lt;f;c++){e=d[c];e.className=e.className.replace(this.rowClsRe,&quot; &quot;);b++;if(b%2===0){e.className+=(&quot; &quot;+this.altRowCls)}}}},refresh:function(b){this.callParent(arguments);this.doStripeRows(0);var a=this.up(&quot;gridpanel&quot;);if(a&amp;&amp;this.invalidateScrollerOnRefresh){a.invalidateScroller()}}});Ext.define(&quot;Ext.grid.Panel&quot;,{extend:&quot;Ext.panel.Table&quot;,requires:[&quot;Ext.grid.View&quot;],alias:[&quot;widget.gridpanel&quot;,&quot;widget.grid&quot;],alternateClassName:[&quot;Ext.list.ListView&quot;,&quot;Ext.ListView&quot;,&quot;Ext.grid.GridPanel&quot;],viewType:&quot;gridview&quot;,lockable:false,normalCfgCopy:[&quot;invalidateScrollerOnRefresh&quot;,&quot;verticalScroller&quot;,&quot;verticalScrollDock&quot;,&quot;verticalScrollerType&quot;,&quot;scroll&quot;],lockedCfgCopy:[&quot;invalidateScrollerOnRefresh&quot;],initComponent:function(){var a=this;if(a.columnLines){a.setColumnLines(a.columnLines)}a.callParent()},setColumnLines:function(a){var b=this,c=(a)?&quot;addClsWithUI&quot;:&quot;removeClsWithUI&quot;;b[c](&quot;with-col-lines&quot;)}});Ext.define(&quot;AM.view.user.List&quot;,{extend:&quot;Ext.grid.Panel&quot;,alias:&quot;widget.userlist&quot;,title:&quot;All Users&quot;,store:&quot;Users&quot;,columns:[{header:&quot;Name&quot;,dataIndex:&quot;name&quot;,flex:1},{header:&quot;Email&quot;,dataIndex:&quot;email&quot;,flex:1}]});Ext.define(&quot;AM.controller.Users&quot;,{extend:&quot;Ext.app.Controller&quot;,stores:[&quot;Users&quot;],models:[&quot;User&quot;],views:[&quot;user.Edit&quot;,&quot;user.List&quot;],refs:[{ref:&quot;usersPanel&quot;,selector:&quot;panel&quot;}],init:function(){this.control({&quot;viewport &gt; userlist dataview&quot;:{itemdblclick:this.editUser},&quot;useredit button[action=save]&quot;:{click:this.updateUser}})},editUser:function(b,a){var c=Ext.create(&quot;AM.view.user.Edit&quot;).show();c.down(&quot;form&quot;).loadRecord(a)},updateUser:function(c){var e=c.up(&quot;window&quot;),d=e.down(&quot;form&quot;),a=d.getRecord(),b=d.getValues();a.set(b);e.close();this.getUsersStore().sync()}});Ext.define(&quot;Ext.selection.RowModel&quot;,{extend:&quot;Ext.selection.Model&quot;,alias:&quot;selection.rowmodel&quot;,requires:[&quot;Ext.util.KeyNav&quot;],deltaScroll:5,enableKeyNav:true,ignoreRightMouseSelection:true,constructor:function(){this.addEvents(&quot;beforedeselect&quot;,&quot;beforeselect&quot;,&quot;deselect&quot;,&quot;select&quot;);this.callParent(arguments)},bindComponent:function(a){var b=this;b.views=b.views||[];b.views.push(a);b.bind(a.getStore(),true);a.on({itemmousedown:b.onRowMouseDown,scope:b});if(b.enableKeyNav){b.initKeyNav(a)}},initKeyNav:function(a){var b=this;if(!a.rendered){a.on(&quot;render&quot;,Ext.Function.bind(b.initKeyNav,b,[a],0),b,{single:true});return}a.el.set({tabIndex:-1});b.keyNav=new Ext.util.KeyNav(a.el,{up:b.onKeyUp,down:b.onKeyDown,right:b.onKeyRight,left:b.onKeyLeft,pageDown:b.onKeyPageDown,pageUp:b.onKeyPageUp,home:b.onKeyHome,end:b.onKeyEnd,scope:b});a.el.on(Ext.EventManager.getKeyEvent(),b.onKeyPress,b)},getRowsVisible:function(){var e=false,a=this.views[0],d=a.getNode(0),b,c;if(d){b=Ext.fly(d).getHeight();c=a.el.getHeight();e=Math.floor(c/b)}return e},onKeyEnd:function(d,a){var c=this,b=c.store.getAt(c.store.getCount()-1);if(b){if(d.shiftKey){c.selectRange(b,c.lastFocused||0);c.setLastFocused(b)}else{if(d.ctrlKey){c.setLastFocused(b)}else{c.doSelect(b)}}}},onKeyHome:function(c,a){var b=this,d=b.store.getAt(0);if(d){if(c.shiftKey){b.selectRange(d,b.lastFocused||0);b.setLastFocused(d)}else{if(c.ctrlKey){b.setLastFocused(d)}else{b.doSelect(d,false)}}}},onKeyPageUp:function(h,d){var g=this,i=g.getRowsVisible(),b,c,a,f;if(i){b=g.lastFocused?g.store.indexOf(g.lastFocused):0;c=b-i;if(c&lt;0){c=0}a=g.store.getAt(c);if(h.shiftKey){f=g.store.getAt(b);g.selectRange(a,f,h.ctrlKey,&quot;up&quot;);g.setLastFocused(a)}else{if(h.ctrlKey){h.preventDefault();g.setLastFocused(a)}else{g.doSelect(a)}}}},onKeyPageDown:function(h,b){var f=this,i=f.getRowsVisible(),a,g,d,c;if(i){a=f.lastFocused?f.store.indexOf(f.lastFocused):0;g=a+i;if(g&gt;=f.store.getCount()){g=f.store.getCount()-1}d=f.store.getAt(g);if(h.shiftKey){c=f.store.getAt(a);f.selectRange(d,c,h.ctrlKey,&quot;down&quot;);f.setLastFocused(d)}else{if(h.ctrlKey){h.preventDefault();f.setLastFocused(d)}else{f.doSelect(d)}}}},onKeyPress:function(d,b){if(d.getKey()===d.SPACE){d.stopEvent();var c=this,a=c.lastFocused;if(a){if(c.isSelected(a)){c.doDeselect(a,false)}else{c.doSelect(a,true)}}}},onKeyUp:function(g,d){var f=this,c=f.views[0],a=f.store.indexOf(f.lastFocused),b;if(a&gt;0){b=f.store.getAt(a-1);if(g.shiftKey&amp;&amp;f.lastFocused){if(f.isSelected(f.lastFocused)&amp;&amp;f.isSelected(b)){f.doDeselect(f.lastFocused,true);f.setLastFocused(b)}else{if(!f.isSelected(f.lastFocused)){f.doSelect(f.lastFocused,true);f.doSelect(b,true)}else{f.doSelect(b,true)}}}else{if(g.ctrlKey){f.setLastFocused(b)}else{f.doSelect(b)}}}},onKeyDown:function(g,d){var f=this,c=f.views[0],a=f.store.indexOf(f.lastFocused),b;if(a+1&lt;f.store.getCount()){b=f.store.getAt(a+1);if(f.selected.getCount()===0){f.doSelect(b)}else{if(g.shiftKey&amp;&amp;f.lastFocused){if(f.isSelected(f.lastFocused)&amp;&amp;f.isSelected(b)){f.doDeselect(f.lastFocused,true);f.setLastFocused(b)}else{if(!f.isSelected(f.lastFocused)){f.doSelect(f.lastFocused,true);f.doSelect(b,true)}else{f.doSelect(b,true)}}}else{if(g.ctrlKey){f.setLastFocused(b)}else{f.doSelect(b)}}}}},scrollByDeltaX:function(d){var a=this.views[0],c=a.up(),b=c.horizontalScroller;if(b){b.scrollByDeltaX(d)}},onKeyLeft:function(b,a){this.scrollByDeltaX(-this.deltaScroll)},onKeyRight:function(b,a){this.scrollByDeltaX(this.deltaScroll)},onRowMouseDown:function(b,a,d,c,f){b.el.focus();if(!this.allowRightMouseSelection(f)){return}this.selectWithEvent(a,f)},allowRightMouseSelection:function(a){var b=this.ignoreRightMouseSelection&amp;&amp;a.button!==0;if(b){b=this.hasSelection()}return !b},onSelectChange:function(f,c,k,a){var h=this,l=h.views,d=l.length,j=h.store,b=j.indexOf(f),g=c?&quot;select&quot;:&quot;deselect&quot;,e=0;if((k||h.fireEvent(&quot;before&quot;+g,h,f,b))!==false&amp;&amp;a()!==false){for(;e&lt;d;e++){if(c){l[e].onRowSelect(b,k)}else{l[e].onRowDeselect(b,k)}}if(!k){h.fireEvent(g,h,f,b)}}},onLastFocusChanged:function(h,d,b){var a=this.views,g=a.length,c=this.store,f,e=0;if(h){f=c.indexOf(h);if(f!=-1){for(;e&lt;g;e++){a[e].onRowFocus(f,false)}}}if(d){f=c.indexOf(d);if(f!=-1){for(e=0;e&lt;g;e++){a[e].onRowFocus(f,true,b)}}}},onEditorTab:function(h,f){var g=this,i=g.views[0],c=h.getActiveRecord(),b=h.getActiveColumn(),d=i.getPosition(c,b),j=f.shiftKey?&quot;left&quot;:&quot;right&quot;,a=i.walkCells(d,j,f,this.preventWrap);if(a){h.startEditByPosition(a)}},selectByPosition:function(a){var b=this.store.getAt(a.row);this.select(b)}});Ext.define(&quot;Ext.grid.Scroller&quot;,{extend:&quot;Ext.Component&quot;,alias:&quot;widget.gridscroller&quot;,weight:110,baseCls:Ext.baseCSSPrefix+&quot;scroller&quot;,focusable:false,reservedSpace:0,renderTpl:['&lt;div class=&quot;'+Ext.baseCSSPrefix+'scroller-ct&quot; id=&quot;{baseId}_ct&quot;&gt;','&lt;div class=&quot;'+Ext.baseCSSPrefix+'stretcher&quot; id=&quot;{baseId}_stretch&quot;&gt;&lt;/div&gt;',&quot;&lt;/div&gt;&quot;],initComponent:function(){var c=this,b=c.dock,a=Ext.baseCSSPrefix+&quot;scroller-vertical&quot;;c.offsets={bottom:0};c.scrollProp=&quot;scrollTop&quot;;c.vertical=true;c.sizeProp=&quot;width&quot;;if(b===&quot;top&quot;||b===&quot;bottom&quot;){a=Ext.baseCSSPrefix+&quot;scroller-horizontal&quot;;c.sizeProp=&quot;height&quot;;c.scrollProp=&quot;scrollLeft&quot;;c.vertical=false;c.weight+=5}c.cls+=(&quot; &quot;+a);Ext.applyIf(c.renderSelectors,{stretchEl:&quot;.&quot;+Ext.baseCSSPrefix+&quot;stretcher&quot;,scrollEl:&quot;.&quot;+Ext.baseCSSPrefix+&quot;scroller-ct&quot;});c.callParent()},ensureDimension:function(){var a=this,b=a.sizeProp;a[b]=a.scrollerSize=Ext.getScrollbarSize()[b]},initRenderData:function(){var b=this,a=b.callParent(arguments)||{};a.baseId=b.id;return a},afterRender:function(){var a=this;a.callParent();a.mon(a.scrollEl,&quot;scroll&quot;,a.onElScroll,a);Ext.cache[a.el.id].skipGarbageCollection=true},onAdded:function(a){this.ownerGrid=a;this.callParent(arguments)},getSizeCalculation:function(){var g=this,c=g.getPanel(),f=1,b=1,d,h;if(!g.vertical){var e=c.query(&quot;tableview&quot;),a=e[1]||e[0];if(!a){return false}f=a.headerCt.getFullWidth();if(Ext.isIEQuirks){f--}}else{d=c.down(&quot;tableview:not([lockableInjected])&quot;);if(!d||!d.el){return false}h=d.el.child(&quot;table&quot;,true);if(!h){return false}b=h.offsetHeight}if(isNaN(f)){f=1}if(isNaN(b)){b=1}return{width:f,height:b}},invalidate:function(d){var f=this,e=f.stretchEl;if(!e||!f.ownerCt){return}var i=f.getSizeCalculation(),h=f.scrollEl,b=h.dom,c=f.reservedSpace,g,a=5;if(i){e.setSize(i);i=f.el.getSize(true);if(f.vertical){i.width+=a;i.height-=c;g=&quot;left&quot;}else{i.width-=c;i.height+=a;g=&quot;top&quot;}h.setSize(i);b.style[g]=(-a)+&quot;px&quot;;b.scrollTop=b.scrollTop}},afterComponentLayout:function(){this.callParent(arguments);this.invalidate()},restoreScrollPos:function(){var c=this,b=this.scrollEl,a=b&amp;&amp;b.dom;if(c._scrollPos!==null&amp;&amp;a){a[c.scrollProp]=c._scrollPos;c._scrollPos=null}},setReservedSpace:function(b){var a=this;if(a.reservedSpace!==b){a.reservedSpace=b;a.invalidate()}},saveScrollPos:function(){var c=this,b=this.scrollEl,a=b&amp;&amp;b.dom;c._scrollPos=a?a[c.scrollProp]:null},setScrollTop:function(c){var b=this.scrollEl,a=b&amp;&amp;b.dom;if(a){return a.scrollTop=Ext.Number.constrain(c,0,a.scrollHeight-a.clientHeight)}},setScrollLeft:function(c){var b=this.scrollEl,a=b&amp;&amp;b.dom;if(a){return a.scrollLeft=Ext.Number.constrain(c,0,a.scrollWidth-a.clientWidth)}},scrollByDeltaY:function(c){var b=this.scrollEl,a=b&amp;&amp;b.dom;if(a){return this.setScrollTop(a.scrollTop+c)}},scrollByDeltaX:function(c){var b=this.scrollEl,a=b&amp;&amp;b.dom;if(a){return this.setScrollLeft(a.scrollLeft+c)}},scrollToTop:function(){this.setScrollTop(0)},onElScroll:function(a,b){this.fireEvent(&quot;bodyscroll&quot;,a,b)},getPanel:function(){var a=this;if(!a.panel){a.panel=this.up(&quot;[scrollerOwner]&quot;)}return a.panel}});Ext.define(&quot;Ext.grid.header.Container&quot;,{extend:&quot;Ext.container.Container&quot;,uses:[&quot;Ext.grid.ColumnLayout&quot;,&quot;Ext.grid.column.Column&quot;,&quot;Ext.menu.Menu&quot;,&quot;Ext.menu.CheckItem&quot;,&quot;Ext.menu.Separator&quot;,&quot;Ext.grid.plugin.HeaderResizer&quot;,&quot;Ext.grid.plugin.HeaderReorderer&quot;],border:true,alias:&quot;widget.headercontainer&quot;,baseCls:Ext.baseCSSPrefix+&quot;grid-header-ct&quot;,dock:&quot;top&quot;,weight:100,defaultType:&quot;gridcolumn&quot;,defaultWidth:100,sortAscText:&quot;Sort Ascending&quot;,sortDescText:&quot;Sort Descending&quot;,sortClearText:&quot;Clear Sort&quot;,columnsText:&quot;Columns&quot;,lastHeaderCls:Ext.baseCSSPrefix+&quot;column-header-last&quot;,firstHeaderCls:Ext.baseCSSPrefix+&quot;column-header-first&quot;,headerOpenCls:Ext.baseCSSPrefix+&quot;column-header-open&quot;,triStateSort:false,ddLock:false,dragging:false,sortable:true,initComponent:function(){var a=this;a.headerCounter=0;a.plugins=a.plugins||[];if(!a.isHeader){a.resizer=Ext.create(&quot;Ext.grid.plugin.HeaderResizer&quot;);a.reorderer=Ext.create(&quot;Ext.grid.plugin.HeaderReorderer&quot;);if(!a.enableColumnResize){a.resizer.disable()}if(!a.enableColumnMove){a.reorderer.disable()}a.plugins.push(a.reorderer,a.resizer)}if(a.isHeader&amp;&amp;!a.items){a.layout=&quot;auto&quot;}else{a.layout={type:&quot;gridcolumn&quot;,availableSpaceOffset:a.availableSpaceOffset,align:&quot;stretchmax&quot;,resetStretch:true}}a.defaults=a.defaults||{};Ext.applyIf(a.defaults,{width:a.defaultWidth,triStateSort:a.triStateSort,sortable:a.sortable});a.callParent();a.addEvents(&quot;columnresize&quot;,&quot;headerclick&quot;,&quot;headertriggerclick&quot;,&quot;columnmove&quot;,&quot;columnhide&quot;,&quot;columnshow&quot;,&quot;sortchange&quot;,&quot;menucreate&quot;)},onDestroy:function(){Ext.destroy(this.resizer,this.reorderer);this.callParent()},applyDefaults:function(a){if(a&amp;&amp;!a.isComponent&amp;&amp;a.xtype==&quot;rownumberer&quot;){return a}return this.callParent([a])},applyColumnsState:function(d){if(!d||!d.length){return}var e=this,c=0,b,a;Ext.each(d,function(f){a=e.down(&quot;gridcolumn[headerId=&quot;+f.id+&quot;]&quot;);if(a){b=e.items.indexOf(a);if(c!==b){e.moveHeader(b,c)}if(a.applyColumnState){a.applyColumnState(f)}++c}})},getColumnsState:function(){var b=this,a=[],c;b.items.each(function(d){c=d.getColumnState&amp;&amp;d.getColumnState();if(c){a.push(c)}});return a},onAdd:function(b){var a=this;if(!b.headerId){b.headerId=b.initialConfig.id||(&quot;h&quot;+(++a.headerCounter))}a.callParent(arguments);a.purgeCache()},onRemove:function(b){var a=this;a.callParent(arguments);a.purgeCache()},afterRender:function(){this.callParent();var a=this.up(&quot;[store]&quot;).store,c=a.sorters,d=c.first(),b;if(d){b=this.down(&quot;gridcolumn[dataIndex=&quot;+d.property+&quot;]&quot;);if(b){b.setSortState(d.direction,false,true)}}},afterLayout:function(){if(!this.isHeader){var e=this,d=e.query(&quot;&gt;gridcolumn:not([hidden])&quot;),c,b,a;e.callParent(arguments);if(d.length){b=d[0].el;if(b!==e.pastFirstHeaderEl){if(e.pastFirstHeaderEl){e.pastFirstHeaderEl.removeCls(e.firstHeaderCls)}b.addCls(e.firstHeaderCls);e.pastFirstHeaderEl=b}a=d[d.length-1].el;if(a!==e.pastLastHeaderEl){if(e.pastLastHeaderEl){e.pastLastHeaderEl.removeCls(e.lastHeaderCls)}a.addCls(e.lastHeaderCls);e.pastLastHeaderEl=a}}}},onHeaderShow:function(g,b){var k=this,l=k.ownerCt,d=k.getMenu(),e,c,h,a,j,f;if(d){h=d.down(&quot;menucheckitem[headerId=&quot;+g.id+&quot;]&quot;);if(h){h.setChecked(true,true)}e=d.query(&quot;#columnItem&gt;menucheckitem[checked]&quot;);c=e.length;if((k.getVisibleGridColumns().length&gt;1)&amp;&amp;k.disabledMenuItems&amp;&amp;k.disabledMenuItems.length){if(c==1){Ext.Array.remove(k.disabledMenuItems,e[0])}for(f=0,j=k.disabledMenuItems.length;f&lt;j;f++){a=k.disabledMenuItems[f];if(!a.isDestroyed){a[a.menu?&quot;enableCheckChange&quot;:&quot;enable&quot;]()}}if(c==1){k.disabledMenuItems=e}else{k.disabledMenuItems=[]}}}if(!g.isGroupHeader){if(k.view){k.view.onHeaderShow(k,g,true)}if(l){l.onHeaderShow(k,g)}}k.fireEvent(&quot;columnshow&quot;,k,g);if(b!==true){k.doLayout()}},doComponentLayout:function(){var a=this;if(a.view&amp;&amp;a.view.saveScrollState){a.view.saveScrollState()}a.callParent(arguments);if(a.view&amp;&amp;a.view.restoreScrollState){a.view.restoreScrollState()}},onHeaderHide:function(f,c){var b=this,a=b.ownerCt,e=b.getMenu(),d;if(e){d=e.down(&quot;menucheckitem[headerId=&quot;+f.id+&quot;]&quot;);if(d){d.setChecked(false,true)}b.setDisabledItems()}if(!f.isGroupHeader){if(b.view){b.view.onHeaderHide(b,f,true)}if(a){a.onHeaderHide(b,f)}if(!c){b.doLayout()}}b.fireEvent(&quot;columnhide&quot;,b,f)},setDisabledItems:function(){var d=this,f=d.getMenu(),b=0,a,e,c;e=f.query(&quot;#columnItem&gt;menucheckitem[checked]&quot;);if((e.length===1)){if(!d.disabledMenuItems){d.disabledMenuItems=[]}if((d.getVisibleGridColumns().length===1)&amp;&amp;e[0].menu){e=e.concat(e[0].menu.query(&quot;menucheckitem[checked]&quot;))}a=e.length;for(b=0;b&lt;a;b++){c=e[b];if(!Ext.Array.contains(d.disabledMenuItems,c)){c.disabled=false;c[c.menu?&quot;disableCheckChange&quot;:&quot;disable&quot;]();d.disabledMenuItems.push(c)}}}},tempLock:function(){this.ddLock=true;Ext.Function.defer(function(){this.ddLock=false},200,this)},onHeaderResize:function(c,a,b){this.tempLock();if(this.view&amp;&amp;this.view.rendered){this.view.onHeaderResize(c,a,b)}},onHeaderClick:function(c,b,a){this.fireEvent(&quot;headerclick&quot;,this,c,b,a)},onHeaderTriggerClick:function(c,b,a){if(this.fireEvent(&quot;headertriggerclick&quot;,this,c,b,a)!==false){this.showMenuBy(a,c)}},showMenuBy:function(b,f){var d=this.getMenu(),e=d.down(&quot;#ascItem&quot;),c=d.down(&quot;#descItem&quot;),a;d.activeHeader=d.ownerCt=f;d.setFloatParent(f);f.titleContainer.addCls(this.headerOpenCls);a=f.sortable?&quot;enable&quot;:&quot;disable&quot;;if(e){e[a]()}if(c){c[a]()}d.showBy(b)},onMenuDeactivate:function(){var a=this.getMenu();a.activeHeader.titleContainer.removeCls(this.headerOpenCls)},moveHeader:function(a,b){this.tempLock();this.onHeaderMoved(this.move(a,b),a,b)},purgeCache:function(){var a=this;delete a.gridDataColumns;delete a.hideableColumns;if(a.menu){a.menu.destroy();delete a.menu}},onHeaderMoved:function(e,b,d){var c=this,a=c.ownerCt;if(a&amp;&amp;a.onHeaderMove){a.onHeaderMove(c,e,b,d)}c.fireEvent(&quot;columnmove&quot;,c,e,b,d)},getMenu:function(){var a=this;if(!a.menu){a.menu=Ext.create(&quot;Ext.menu.Menu&quot;,{hideOnParentHide:false,items:a.getMenuItems(),listeners:{deactivate:a.onMenuDeactivate,scope:a}});a.setDisabledItems();a.fireEvent(&quot;menucreate&quot;,a,a.menu)}return a.menu},getMenuItems:function(){var c=this,b=[],a=c.enableColumnHide?c.getColumnMenu(c):null;if(c.sortable){b=[{itemId:&quot;ascItem&quot;,text:c.sortAscText,cls:Ext.baseCSSPrefix+&quot;hmenu-sort-asc&quot;,handler:c.onSortAscClick,scope:c},{itemId:&quot;descItem&quot;,text:c.sortDescText,cls:Ext.baseCSSPrefix+&quot;hmenu-sort-desc&quot;,handler:c.onSortDescClick,scope:c}]}if(a&amp;&amp;a.length){b.push(&quot;-&quot;,{itemId:&quot;columnItem&quot;,text:c.columnsText,cls:Ext.baseCSSPrefix+&quot;cols-icon&quot;,menu:a})}return b},onSortAscClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState(&quot;ASC&quot;)},onSortDescClick:function(){var b=this.getMenu(),a=b.activeHeader;a.setSortState(&quot;DESC&quot;)},getColumnMenu:function(f){var c=[],b=0,e,a=f.query(&quot;&gt;gridcolumn[hideable]&quot;),g=a.length,d;for(;b&lt;g;b++){e=a[b];d=Ext.create(&quot;Ext.menu.CheckItem&quot;,{text:e.text,checked:!e.hidden,hideOnClick:false,headerId:e.id,menu:e.isGroupHeader?this.getColumnMenu(e):undefined,checkHandler:this.onColumnCheckChange,scope:this});if(g===1){d.disabled=true}c.push(d);e.on({destroy:Ext.Function.bind(d.destroy,d)})}return c},onColumnCheckChange:function(a,b){var c=Ext.getCmp(a.headerId);c[b?&quot;show&quot;:&quot;hide&quot;]()},getColumnsForTpl:function(e){var c=[],d=this.getGridColumns(e),g=d.length,a=0,f,b;for(;a&lt;g;a++){f=d[a];if(f.hidden||f.up(&quot;headercontainer[hidden=true]&quot;)){b=0}else{b=f.getDesiredWidth();if((a===0)&amp;&amp;(Ext.isIE6||Ext.isIE7)){b+=1}}c.push({dataIndex:f.dataIndex,align:f.align,width:b,id:f.id,cls:f.tdCls,columnId:f.getItemId()})}return c},getColumnCount:function(){return this.getGridColumns().length},getFullWidth:function(d){var c=0,b=this.getVisibleGridColumns(d),e=b.length,a=0;for(;a&lt;e;a++){if(!isNaN(b[a].width)){if(b[a].getDesiredWidth){c+=b[a].getDesiredWidth()}else{c+=b[a].getWidth()}}}return c},clearOtherSortStates:function(a){var c=this.getGridColumns(),e=c.length,b=0,d;for(;b&lt;e;b++){if(c[b]!==a){d=c[b].sortState;c[b].setSortState(null,true)}}},getVisibleGridColumns:function(a){return Ext.ComponentQuery.query(&quot;:not([hidden])&quot;,this.getGridColumns(a))},getGridColumns:function(b){var c=this,a=b?null:c.gridDataColumns;if(!a){c.gridDataColumns=a=[];c.cascade(function(d){if((d!==c)&amp;&amp;!d.isGroupHeader){a.push(d)}})}return a},getHideableColumns:function(b){var c=this,a=b?null:c.hideableColumns;if(!a){a=c.hideableColumns=c.query(&quot;[hideable]&quot;)}return a},getHeaderIndex:function(b){var a=this.getGridColumns();return Ext.Array.indexOf(a,b)},getHeaderAtIndex:function(a){var b=this.getGridColumns();return b[a]},prepareData:function(h,c,j,l,a){var g={},d=this.gridDataColumns||this.getGridColumns(),e=d.length,f=0,i,o,k,n,b,m=a.store;for(;f&lt;e;f++){b={tdCls:&quot;&quot;,style:&quot;&quot;};i=d[f];o=i.id;k=i.renderer;n=h[i.dataIndex];if(typeof k===&quot;string&quot;){i.renderer=k=Ext.util.Format[k]}if(typeof k===&quot;function&quot;){n=k.call(i.scope||this.ownerCt,n,b,j,c,f,m,l)}g[o+&quot;-modified&quot;]=j.isModified(i.dataIndex)?Ext.baseCSSPrefix+&quot;grid-dirty-cell&quot;:&quot;&quot;;g[o+&quot;-tdCls&quot;]=b.tdCls;g[o+&quot;-tdAttr&quot;]=b.tdAttr;g[o+&quot;-style&quot;]=b.style;if(n===undefined||n===null||n===&quot;&quot;){n=&quot;&amp;#160;&quot;}g[o]=n}return g},expandToFit:function(a){if(this.view){this.view.expandToFit(a)}}});Ext.define(&quot;Ext.view.TableChunker&quot;,{singleton:true,requires:[&quot;Ext.XTemplate&quot;],metaTableTpl:[&quot;{[this.openTableWrap()]}&quot;,'&lt;table class=&quot;'+Ext.baseCSSPrefix+&quot;grid-table &quot;+Ext.baseCSSPrefix+'grid-table-resizer&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; {[this.embedFullWidth()]}&gt;',&quot;&lt;tbody&gt;&quot;,'&lt;tr class=&quot;'+Ext.baseCSSPrefix+'grid-header-row&quot;&gt;','&lt;tpl for=&quot;columns&quot;&gt;','&lt;th class=&quot;'+Ext.baseCSSPrefix+'grid-col-resizer-{id}&quot; style=&quot;width: {width}px; height: 0px;&quot;&gt;&lt;/th&gt;',&quot;&lt;/tpl&gt;&quot;,&quot;&lt;/tr&gt;&quot;,&quot;{[this.openRows()]}&quot;,&quot;{row}&quot;,'&lt;tpl for=&quot;features&quot;&gt;',&quot;{[this.embedFeature(values, parent, xindex, xcount)]}&quot;,&quot;&lt;/tpl&gt;&quot;,&quot;{[this.closeRows()]}&quot;,&quot;&lt;/tbody&gt;&quot;,&quot;&lt;/table&gt;&quot;,&quot;{[this.closeTableWrap()]}&quot;],constructor:function(){Ext.XTemplate.prototype.recurse=function(b,a){return this.apply(a?b[a]:b)}},embedFeature:function(b,d,a,e){var c=&quot;&quot;;if(!b.disabled){c=b.getFeatureTpl(b,d,a,e)}return c},embedFullWidth:function(){return'style=&quot;width: {fullWidth}px;&quot;'},openRows:function(){return'&lt;tpl for=&quot;rows&quot;&gt;'},closeRows:function(){return&quot;&lt;/tpl&gt;&quot;},metaRowTpl:['&lt;tr class=&quot;'+Ext.baseCSSPrefix+'grid-row {addlSelector} {[this.embedRowCls()]}&quot; {[this.embedRowAttr()]}&gt;','&lt;tpl for=&quot;columns&quot;&gt;','&lt;td class=&quot;{cls} '+Ext.baseCSSPrefix+&quot;grid-cell &quot;+Ext.baseCSSPrefix+'grid-cell-{columnId} {{id}-modified} {{id}-tdCls} {[this.firstOrLastCls(xindex, xcount)]}&quot; {{id}-tdAttr}&gt;&lt;div unselectable=&quot;on&quot; class=&quot;'+Ext.baseCSSPrefix+&quot;grid-cell-inner &quot;+Ext.baseCSSPrefix+'unselectable&quot; style=&quot;{{id}-style}; text-align: {align};&quot;&gt;{{id}}&lt;/div&gt;&lt;/td&gt;',&quot;&lt;/tpl&gt;&quot;,&quot;&lt;/tr&gt;&quot;],firstOrLastCls:function(b,c){var a=&quot;&quot;;if(b===1){a=Ext.baseCSSPrefix+&quot;grid-cell-first&quot;}else{if(b===c){a=Ext.baseCSSPrefix+&quot;grid-cell-last&quot;}}return a},embedRowCls:function(){return&quot;{rowCls}&quot;},embedRowAttr:function(){return&quot;{rowAttr}&quot;},openTableWrap:function(){return&quot;&quot;},closeTableWrap:function(){return&quot;&quot;},getTableTpl:function(j,b){var h,g={openRows:this.openRows,closeRows:this.closeRows,embedFeature:this.embedFeature,embedFullWidth:this.embedFullWidth,openTableWrap:this.openTableWrap,closeTableWrap:this.closeTableWrap},f={},c=j.features||[],l=c.length,e=0,k={embedRowCls:this.embedRowCls,embedRowAttr:this.embedRowAttr,firstOrLastCls:this.firstOrLastCls},d=Array.prototype.slice.call(this.metaRowTpl,0),a;for(;e&lt;l;e++){if(!c[e].disabled){c[e].mutateMetaRowTpl(d);Ext.apply(k,c[e].getMetaRowTplFragments());Ext.apply(f,c[e].getFragmentTpl());Ext.apply(g,c[e].getTableFragments())}}d=Ext.create(&quot;Ext.XTemplate&quot;,d.join(&quot;&quot;),k);j.row=d.applyTemplate(j);a=Ext.create(&quot;Ext.XTemplate&quot;,this.metaTableTpl.join(&quot;&quot;),g);h=a.applyTemplate(j);if(!b){h=Ext.create(&quot;Ext.XTemplate&quot;,h,f)}return h}});Ext.define(&quot;Ext.grid.LockingView&quot;,{mixins:{observable:&quot;Ext.util.Observable&quot;},eventRelayRe:/^(beforeitem|beforecontainer|item|container|cell)/,constructor:function(c){var f=this,h=[],a=f.eventRelayRe,b=c.locked.getView(),g=c.normal.getView(),d,e;Ext.apply(f,{lockedView:b,normalView:g,lockedGrid:c.locked,normalGrid:c.normal,panel:c.panel});f.mixins.observable.constructor.call(f,c);d=b.events;for(e in d){if(d.hasOwnProperty(e)&amp;&amp;a.test(e)){h.push(e)}}f.relayEvents(b,h);f.relayEvents(g,h);g.on({scope:f,itemmouseleave:f.onItemMouseLeave,itemmouseenter:f.onItemMouseEnter});b.on({scope:f,itemmouseleave:f.onItemMouseLeave,itemmouseenter:f.onItemMouseEnter})},getGridColumns:function(){var a=this.lockedGrid.headerCt.getGridColumns();return a.concat(this.normalGrid.headerCt.getGridColumns())},getEl:function(a){return this.getViewForColumn(a).getEl()},getViewForColumn:function(b){var a=this.lockedView,c;a.headerCt.cascade(function(d){if(d===b){c=true;return false}});return c?a:this.normalView},onItemMouseEnter:function(c,b){var f=this,d=f.lockedView,a=f.normalView,e;if(c.trackOver){if(c!==d){a=d}e=a.getNode(b);a.highlightItem(e)}},onItemMouseLeave:function(c,b){var e=this,d=e.lockedView,a=e.normalView;if(c.trackOver){if(c!==d){a=d}a.clearHighlight()}},relayFn:function(c,b){b=b||[];var a=this.lockedView;a[c].apply(a,b||[]);a=this.normalView;a[c].apply(a,b||[])},getSelectionModel:function(){return this.panel.getSelectionModel()},getStore:function(){return this.panel.store},getNode:function(a){return this.normalView.getNode(a)},getCell:function(b,c){var a=this.getViewForColumn(c),d;d=a.getNode(b);return Ext.fly(d).down(c.getCellSelector())},getRecord:function(b){var a=this.lockedView.getRecord(b);if(!b){a=this.normalView.getRecord(b)}return a},addElListener:function(a,c,b){this.relayFn(&quot;addElListener&quot;,arguments)},refreshNode:function(){this.relayFn(&quot;refreshNode&quot;,arguments)},refresh:function(){this.relayFn(&quot;refresh&quot;,arguments)},bindStore:function(){this.relayFn(&quot;bindStore&quot;,arguments)},addRowCls:function(){this.relayFn(&quot;addRowCls&quot;,arguments)},removeRowCls:function(){this.relayFn(&quot;removeRowCls&quot;,arguments)}});Ext.define(&quot;Ext.grid.Lockable&quot;,{requires:[&quot;Ext.grid.LockingView&quot;],syncRowHeight:true,spacerHidden:true,headerCounter:0,unlockText:&quot;Unlock&quot;,lockText:&quot;Lock&quot;,determineXTypeToCreate:function(){var c=this,f;if(c.subGridXType){f=c.subGridXType}else{var d=this.getXTypes().split(&quot;/&quot;),b=d.length,e=d[b-1],a=d[b-2];if(a!==&quot;tablepanel&quot;){f=a}else{f=e}}return f},injectLockable:function(){this.lockable=true;this.hasView=true;var j=this,a=j.determineXTypeToCreate(),g=j.getSelectionModel(),b={xtype:a,enableAnimations:false,scroll:false,scrollerOwner:false,selModel:g,border:false,cls:Ext.baseCSSPrefix+&quot;grid-inner-locked&quot;},h={xtype:a,enableAnimations:false,scrollerOwner:false,selModel:g,border:false},e=0,d,c,f;j.addCls(Ext.baseCSSPrefix+&quot;grid-locked&quot;);Ext.copyTo(h,j,j.normalCfgCopy);Ext.copyTo(b,j,j.lockedCfgCopy);for(;e&lt;j.normalCfgCopy.length;e++){delete j[j.normalCfgCopy[e]]}for(e=0;e&lt;j.lockedCfgCopy.length;e++){delete j[j.lockedCfgCopy[e]]}j.addEvents(&quot;lockcolumn&quot;,&quot;unlockcolumn&quot;);j.addStateEvents([&quot;lockcolumn&quot;,&quot;unlockcolumn&quot;]);j.lockedHeights=[];j.normalHeights=[];d=j.processColumns(j.columns);b.width=d.lockedWidth+Ext.num(g.headerWidth,0);b.columns=d.locked;h.columns=d.normal;j.store=Ext.StoreManager.lookup(j.store);b.store=j.store;h.store=j.store;h.flex=1;b.viewConfig=j.lockedViewConfig||{};b.viewConfig.loadingUseMsg=false;h.viewConfig=j.normalViewConfig||{};Ext.applyIf(b.viewConfig,j.viewConfig);Ext.applyIf(h.viewConfig,j.viewConfig);j.normalGrid=Ext.ComponentManager.create(h);j.lockedGrid=Ext.ComponentManager.create(b);j.view=Ext.create(&quot;Ext.grid.LockingView&quot;,{locked:j.lockedGrid,normal:j.normalGrid,panel:j});if(j.syncRowHeight){j.lockedGrid.getView().on({refresh:j.onLockedGridAfterRefresh,itemupdate:j.onLockedGridAfterUpdate,scope:j});j.normalGrid.getView().on({refresh:j.onNormalGridAfterRefresh,itemupdate:j.onNormalGridAfterUpdate,scope:j})}c=j.lockedGrid.headerCt;f=j.normalGrid.headerCt;c.lockedCt=true;c.lockableInjected=true;f.lockableInjected=true;c.on({columnshow:j.onLockedHeaderShow,columnhide:j.onLockedHeaderHide,columnmove:j.onLockedHeaderMove,sortchange:j.onLockedHeaderSortChange,columnresize:j.onLockedHeaderResize,scope:j});f.on({columnmove:j.onNormalHeaderMove,sortchange:j.onNormalHeaderSortChange,scope:j});j.normalGrid.on({scrollershow:j.onScrollerShow,scrollerhide:j.onScrollerHide,scope:j});j.lockedGrid.on(&quot;afterlayout&quot;,j.onLockedGridAfterLayout,j,{single:true});j.modifyHeaderCt();j.items=[j.lockedGrid,j.normalGrid];j.relayHeaderCtEvents(c);j.relayHeaderCtEvents(f);j.layout={type:&quot;hbox&quot;,align:&quot;stretch&quot;}},processColumns:function(f){var e=0,a=f.length,b=1,d=[],c=[],g;for(;e&lt;a;++e){g=f[e];g.processed=true;if(g.locked){if(!g.hidden){b+=g.width||Ext.grid.header.Container.prototype.defaultWidth}d.push(g)}else{c.push(g)}if(!g.headerId){g.headerId=(g.initialConfig||g).id||(&quot;L&quot;+(++this.headerCounter))}}return{lockedWidth:b,locked:d,normal:c}},onLockedGridAfterLayout:function(){var b=this,a=b.lockedGrid.getView();a.on({beforerefresh:b.destroySpacer,scope:b})},onLockedHeaderMove:function(){if(this.syncRowHeight){this.onNormalGridAfterRefresh()}},onNormalHeaderMove:function(){if(this.syncRowHeight){this.onLockedGridAfterRefresh()}},getSpacerEl:function(){var d=this,b,a,c;if(!d.spacerEl){b=Ext.getScrollBarWidth()+(Ext.isIE?2:0);a=d.lockedGrid.getView();c=a.el;d.spacerEl=Ext.DomHelper.append(c,{cls:d.spacerHidden?(Ext.baseCSSPrefix+&quot;hidden&quot;):&quot;&quot;,style:&quot;height: &quot;+b+&quot;px;&quot;},true)}return d.spacerEl},destroySpacer:function(){var a=this;if(a.spacerEl){a.spacerEl.destroy();delete a.spacerEl}},onLockedGridAfterRefresh:function(){var e=this,a=e.lockedGrid.getView(),c=a.el,f=c.query(a.getItemSelector()),d=f.length,b=0;e.lockedHeights=[];for(;b&lt;d;b++){e.lockedHeights[b]=f[b].clientHeight}e.syncRowHeights()},onNormalGridAfterRefresh:function(){var e=this,a=e.normalGrid.getView(),c=a.el,f=c.query(a.getItemSelector()),d=f.length,b=0;e.normalHeights=[];for(;b&lt;d;b++){e.normalHeights[b]=f[b].clientHeight}e.syncRowHeights()},onLockedGridAfterUpdate:function(a,b,c){this.lockedHeights[b]=c.clientHeight;this.syncRowHeights()},onNormalGridAfterUpdate:function(a,b,c){this.normalHeights[b]=c.clientHeight;this.syncRowHeights()},syncRowHeights:function(){var k=this,b=k.lockedHeights,l=k.normalHeights,a=[],j=b.length,g=0,m,d,e,h,f=k.getVerticalScroller(),c;if(b.length&amp;&amp;l.length){m=k.lockedGrid.getView();d=k.normalGrid.getView();e=m.el.query(m.getItemSelector());h=d.el.query(d.getItemSelector());for(;g&lt;j;g++){if(!isNaN(b[g])&amp;&amp;!isNaN(l[g])){if(b[g]&gt;l[g]){Ext.fly(h[g]).setHeight(b[g])}else{if(b[g]&lt;l[g]){Ext.fly(e[g]).setHeight(l[g])}}}}k.normalGrid.invalidateScroller();if(f&amp;&amp;f.setViewScrollTop){f.setViewScrollTop(k.virtualScrollTop)}else{c=d.el.dom.scrollTop;d.el.dom.scrollTop=c;m.el.dom.scrollTop=c}k.lockedHeights=[];k.normalHeights=[]}},onScrollerShow:function(a,b){if(b===&quot;horizontal&quot;){this.spacerHidden=false;this.getSpacerEl().removeCls(Ext.baseCSSPrefix+&quot;hidden&quot;)}},onScrollerHide:function(a,b){if(b===&quot;horizontal&quot;){this.spacerHidden=true;if(this.spacerEl){this.spacerEl.addCls(Ext.baseCSSPrefix+&quot;hidden&quot;)}}},modifyHeaderCt:function(){var a=this;a.lockedGrid.headerCt.getMenuItems=a.getMenuItems(true);a.normalGrid.headerCt.getMenuItems=a.getMenuItems(false)},onUnlockMenuClick:function(){this.unlock()},onLockMenuClick:function(){this.lock()},getMenuItems:function(b){var f=this,g=f.unlockText,h=f.lockText,c=Ext.baseCSSPrefix+&quot;hmenu-unlock&quot;,e=Ext.baseCSSPrefix+&quot;hmenu-lock&quot;,a=Ext.Function.bind(f.onUnlockMenuClick,f),d=Ext.Function.bind(f.onLockMenuClick,f);return function(){var i=Ext.grid.header.Container.prototype.getMenuItems.call(this);i.push(&quot;-&quot;,{cls:c,text:g,handler:a,disabled:!b});i.push({cls:e,text:h,handler:d,disabled:b});return i}},lock:function(a,d){var c=this,e=c.normalGrid,g=c.lockedGrid,f=e.headerCt,b=g.headerCt;a=a||f.getMenu().activeHeader;if(a.flex){a.width=a.getWidth();delete a.flex}f.remove(a,false);b.suspendLayout=true;a.locked=true;if(Ext.isDefined(d)){b.insert(d,a)}else{b.add(a)}b.suspendLayout=false;c.syncLockedSection();c.fireEvent(&quot;lockcolumn&quot;,c,a)},syncLockedSection:function(){var a=this;a.syncLockedWidth();a.lockedGrid.getView().refresh();a.normalGrid.getView().refresh()},syncLockedWidth:function(){var b=this,a=b.lockedGrid.headerCt.getFullWidth(true);b.lockedGrid.setWidth(a+1);b.doComponentLayout()},onLockedHeaderResize:function(){this.syncLockedWidth()},onLockedHeaderHide:function(){this.syncLockedWidth()},onLockedHeaderShow:function(){this.syncLockedWidth()},onLockedHeaderSortChange:function(b,c,a){if(a){this.normalGrid.headerCt.clearOtherSortStates(null,true)}},onNormalHeaderSortChange:function(b,c,a){if(a){this.lockedGrid.headerCt.clearOtherSortStates(null,true)}},unlock:function(a,d){var c=this,e=c.normalGrid,g=c.lockedGrid,f=e.headerCt,b=g.headerCt;if(!Ext.isDefined(d)){d=0}a=a||b.getMenu().activeHeader;b.remove(a,false);c.syncLockedWidth();c.lockedGrid.getView().refresh();a.locked=false;f.insert(d,a);c.normalGrid.getView().refresh();c.fireEvent(&quot;unlockcolumn&quot;,c,a)},applyColumnsState:function(e){var k=this,c=k.lockedGrid,d=c.headerCt,i=k.normalGrid.headerCt,l=d.items,f=i.items,a,h=[],j=[],b,g=1;Ext.each(e,function(m){function n(o){return o.headerId==m.id}b=true;if(!(a=l.findBy(n))){a=f.findBy(n);b=false}if(a){if(a.applyColumnState){a.applyColumnState(m)}if(!Ext.isDefined(a.locked)){a.locked=b}if(a.locked){h.push(a);if(!a.hidden&amp;&amp;Ext.isNumber(a.width)){g+=a.width}}else{j.push(a)}}});if(h.length+j.length==l.getCount()+f.getCount()){d.removeAll(false);i.removeAll(false);d.add(h);i.add(j);c.setWidth(g)}},getColumnsState:function(){var b=this,a=b.lockedGrid.headerCt.getColumnsState(),c=b.normalGrid.headerCt.getColumnsState();return a.concat(c)},reconfigureLockable:function(a,b){var c=this,e=c.lockedGrid,d=c.normalGrid;if(b){e.headerCt.suspendLayout=true;d.headerCt.suspendLayout=true;e.headerCt.removeAll();d.headerCt.removeAll();b=c.processColumns(b);e.setWidth(b.lockedWidth);e.headerCt.add(b.locked);d.headerCt.add(b.normal)}if(a){a=Ext.data.StoreManager.lookup(a);c.store=a;e.bindStore(a);d.bindStore(a)}else{e.getView().refresh();d.getView().refresh()}if(b){e.headerCt.suspendLayout=false;d.headerCt.suspendLayout=false;e.headerCt.forceComponentLayout();d.headerCt.forceComponentLayout()}}});Ext.define(&quot;Ext.grid.ColumnLayout&quot;,{extend:&quot;Ext.layout.container.HBox&quot;,alias:&quot;layout.gridcolumn&quot;,type:&quot;column&quot;,reserveOffset:false,shrinkToFit:false,clearInnerCtOnLayout:true,beforeLayout:function(){var g=this,c=0,b=g.getLayoutItems(),a=b.length,f,e,d;if(!Ext.isDefined(g.availableSpaceOffset)){d=g.owner.up(&quot;tablepanel&quot;).verticalScroller;g.availableSpaceOffset=d?d.width-1:0}e=g.callParent(arguments);g.innerCt.setHeight(23);for(;c&lt;a;c++){f=b[c];f.el.setStyle({height:&quot;auto&quot;});f.titleContainer.setStyle({height:&quot;auto&quot;,paddingTop:&quot;0&quot;});if(f.componentLayout&amp;&amp;f.componentLayout.lastComponentSize){f.componentLayout.lastComponentSize.height=f.el.dom.offsetHeight}}return e},calculateChildBoxes:function(k,c){var h=this,b=h.callParent(arguments),f=b.boxes,a=b.meta,g=f.length,d=0,e,j;if(c.width&amp;&amp;!h.isHeader){if(h.owner.forceFit){for(;d&lt;g;d++){e=f[d];j=e.component;j.minWidth=Ext.grid.plugin.HeaderResizer.prototype.minColWidth;j.flex=e.width}b=h.callParent(arguments)}else{if(a.tooNarrow){c.width=a.desiredSize}}}return b},afterLayout:function(){var l=this,a=l.owner,k,m,g,b,f,c,e=0,j,h,d;l.callParent(arguments);if(!l.owner.hideHeaders){if(a.lockableInjected){k=a.up(&quot;tablepanel&quot;).up(&quot;tablepanel&quot;);m=k.query(&quot;headercontainer:not([isHeader])&quot;);g=(m[0]===a)?m[1]:m[0];if(!g.rendered){return}f=g.layout.getRenderTarget().getViewSize().height;if(!f){return}b=this.getRenderTarget().getViewSize().height;if(!b){return}k.componentLayout.layoutBusy=true;d=b;if(b&gt;f){g.layout.align=&quot;stretch&quot;;g.setCalculatedSize(g.getWidth(),a.getHeight(),g.ownerCt);delete g.layout.align;c=g.up(&quot;tablepanel&quot;)}else{if(f&gt;b){d=f;this.align=&quot;stretch&quot;;a.setCalculatedSize(a.getWidth(),g.getHeight(),a.ownerCt);delete this.align;c=a.up(&quot;tablepanel&quot;)}}k.componentLayout.layoutBusy=false;j=m[0].layout.getLayoutItems().concat(m[1].layout.getLayoutItems())}else{d=this.getRenderTarget().getViewSize().height;j=l.getLayoutItems()}h=j.length;for(;e&lt;h;e++){j[e].setPadding(d)}if(c){setTimeout(function(){c.doLayout()},1)}}},updateInnerCtSize:function(b,d){var c=this,a;if(!c.isHeader){c.tooNarrow=d.meta.tooNarrow;a=(c.reserveOffset?c.availableSpaceOffset:0);if(d.meta.tooNarrow){b.width=d.meta.desiredSize+a}else{b.width+=a}}return c.callParent(arguments)},doOwnerCtLayouts:function(){var a=this.owner.ownerCt;if(!a.componentLayout.layoutBusy){a.doComponentLayout()}}});Ext.define(&quot;Ext.grid.column.Column&quot;,{extend:&quot;Ext.grid.header.Container&quot;,alias:&quot;widget.gridcolumn&quot;,requires:[&quot;Ext.util.KeyNav&quot;],alternateClassName:&quot;Ext.grid.Column&quot;,baseCls:Ext.baseCSSPrefix+&quot;column-header &quot;+Ext.baseCSSPrefix+&quot;unselectable&quot;,hoverCls:Ext.baseCSSPrefix+&quot;column-header-over&quot;,handleWidth:5,sortState:null,possibleSortStates:[&quot;ASC&quot;,&quot;DESC&quot;],renderTpl:'&lt;div id=&quot;{id}-titleContainer&quot; class=&quot;'+Ext.baseCSSPrefix+'column-header-inner&quot;&gt;&lt;span id=&quot;{id}-textEl&quot; class=&quot;'+Ext.baseCSSPrefix+'column-header-text&quot;&gt;{text}&lt;/span&gt;&lt;tpl if=&quot;!values.menuDisabled&quot;&gt;&lt;div id=&quot;{id}-triggerEl&quot; class=&quot;'+Ext.baseCSSPrefix+'column-header-trigger&quot;&gt;&lt;/div&gt;&lt;/tpl&gt;&lt;/div&gt;',dataIndex:null,text:&quot;&amp;#160;&quot;,sortable:true,hideable:true,menuDisabled:false,renderer:false,align:&quot;left&quot;,draggable:true,initDraggable:Ext.emptyFn,isHeader:true,initComponent:function(){var d=this,b,a,c;if(Ext.isDefined(d.header)){d.text=d.header;delete d.header}if(d.flex){d.minWidth=d.minWidth||Ext.grid.plugin.HeaderResizer.prototype.minColWidth}else{d.minWidth=d.width}if(!d.triStateSort){d.possibleSortStates.length=2}if(Ext.isDefined(d.columns)){d.isGroupHeader=true;d.items=d.columns;delete d.columns;delete d.flex;d.width=0;for(b=0,a=d.items.length;b&lt;a;b++){c=d.items[b];if(!c.hidden){d.width+=c.width||Ext.grid.header.Container.prototype.defaultWidth}}d.minWidth=d.width;d.cls=(d.cls||&quot;&quot;)+&quot; &quot;+Ext.baseCSSPrefix+&quot;group-header&quot;;d.sortable=false;d.resizable=false;d.align=&quot;center&quot;}d.addChildEls(&quot;titleContainer&quot;,&quot;triggerEl&quot;,&quot;textEl&quot;);d.callParent(arguments)},onAdd:function(a){a.isSubHeader=true;a.addCls(Ext.baseCSSPrefix+&quot;group-sub-header&quot;);this.callParent(arguments)},onRemove:function(a){a.isSubHeader=false;a.removeCls(Ext.baseCSSPrefix+&quot;group-sub-header&quot;);this.callParent(arguments)},initRenderData:function(){var a=this;Ext.applyIf(a.renderData,{text:a.text,menuDisabled:a.menuDisabled});return a.callParent(arguments)},applyColumnState:function(b){var a=this,c=Ext.isDefined;a.applyColumnsState(b.columns);if(c(b.hidden)){a.hidden=b.hidden}if(c(b.locked)){a.locked=b.locked}if(c(b.sortable)){a.sortable=b.sortable}if(c(b.width)){delete a.flex;a.width=b.width}else{if(c(b.flex)){delete a.width;a.flex=b.flex}}},getColumnState:function(){var b=this,a=[],c={id:b.headerId};b.savePropsToState([&quot;hidden&quot;,&quot;sortable&quot;,&quot;locked&quot;,&quot;flex&quot;,&quot;width&quot;],c);if(b.isGroupHeader){b.items.each(function(d){a.push(d.getColumnState())});if(a.length){c.columns=a}}else{if(b.isSubHeader&amp;&amp;b.ownerCt.hidden){delete b.hidden}}if(&quot;width&quot; in c){delete c.flex}return c},setText:function(a){this.text=a;if(this.rendered){this.textEl.update(a)}},getOwnerHeaderCt:function(){return this.up(&quot;:not([isHeader])&quot;)},getIndex:function(){return this.isGroupColumn?false:this.getOwnerHeaderCt().getHeaderIndex(this)},onRender:function(){var b=this,a=b.up(&quot;tablepanel&quot;);if(a&amp;&amp;(!b.sortable||a.sortableColumns===false)&amp;&amp;!b.groupable&amp;&amp;!b.lockable&amp;&amp;(a.enableColumnHide===false||!b.getOwnerHeaderCt().getHideableColumns().length)){b.menuDisabled=true}b.callParent(arguments)},afterRender:function(){var b=this,a=b.el;b.callParent(arguments);a.addCls(Ext.baseCSSPrefix+&quot;column-header-align-&quot;+b.align).addClsOnOver(b.overCls);b.mon(a,{click:b.onElClick,dblclick:b.onElDblClick,scope:b});if(!Ext.isIE8||!Ext.isStrict){b.mon(b.getFocusEl(),{focus:b.onTitleMouseOver,blur:b.onTitleMouseOut,scope:b})}b.mon(b.titleContainer,{mouseenter:b.onTitleMouseOver,mouseleave:b.onTitleMouseOut,scope:b});b.keyNav=Ext.create(&quot;Ext.util.KeyNav&quot;,a,{enter:b.onEnterKey,down:b.onDownKey,scope:b})},setWidth:function(b,a){var h=this,c=h.ownerCt,j,g,f,d=h.getWidth(),e=0,k;if(b!==d){h.oldWidth=d;h.minWidth=h.width=b;if(c.isGroupHeader){j=c.items.items;g=j.length;for(f=0;f&lt;g;f++){k=j[f];if(!k.hidden){e+=(k===h)?b:k.getWidth()}}c.setWidth(e,a)}else{if(a!==false){c.doLayout()}}}},afterComponentLayout:function(c,a){var d=this,b=this.getOwnerHeaderCt();d.callParent(arguments);if(c&amp;&amp;!d.isGroupHeader&amp;&amp;b){b.onHeaderResize(d,c,true)}if(d.oldWidth&amp;&amp;(c!==d.oldWidth)){b.fireEvent(&quot;columnresize&quot;,b,this,c)}delete d.oldWidth},setPadding:function(a){var c=this,b=Ext.util.TextMetrics.measure(c.textEl.dom,c.text).height;if(!c.isGroupHeader){if(c.titleContainer.getHeight()&lt;a){c.titleContainer.dom.style.height=a+&quot;px&quot;}}a=c.titleContainer.getViewSize().height;if(b){c.titleContainer.setStyle({paddingTop:Math.max(((a-b)/2),0)+&quot;px&quot;})}if(Ext.isIE&amp;&amp;c.triggerEl){c.triggerEl.setHeight(a)}},onDestroy:function(){var a=this;Ext.destroy(a.textEl,a.keyNav);delete a.keyNav;a.callParent(arguments)},onTitleMouseOver:function(){this.titleContainer.addCls(this.hoverCls)},onTitleMouseOut:function(){this.titleContainer.removeCls(this.hoverCls)},onDownKey:function(a){if(this.triggerEl){this.onElClick(a,this.triggerEl.dom||this.el.dom)}},onEnterKey:function(a){this.onElClick(a,this.el.dom)},onElDblClick:function(d,a){var c=this,b=c.ownerCt;if(b&amp;&amp;Ext.Array.indexOf(b.items,c)!==0&amp;&amp;c.isOnLeftEdge(d)){b.expandToFit(c.previousSibling(&quot;gridcolumn&quot;))}},onElClick:function(d,b){var c=this,a=c.getOwnerHeaderCt();if(a&amp;&amp;!a.ddLock){if(c.triggerEl&amp;&amp;(d.target===c.triggerEl.dom||b===c.triggerEl.dom||d.within(c.triggerEl))){a.onHeaderTriggerClick(c,d,b)}else{if(d.getKey()||(!c.isOnLeftEdge(d)&amp;&amp;!c.isOnRightEdge(d))){c.toggleSortState();a.onHeaderClick(c,d,b)}}}},processEvent:function(f,b,a,c,d,g){return this.fireEvent.apply(this,arguments)},toggleSortState:function(){var b=this,a,c;if(b.sortable){a=Ext.Array.indexOf(b.possibleSortStates,b.sortState);c=(a+1)%b.possibleSortStates.length;b.setSortState(b.possibleSortStates[c])}},doSort:function(b){var a=this.up(&quot;tablepanel&quot;).store;a.sort({property:this.getSortParam(),direction:b})},getSortParam:function(){return this.dataIndex},setSortState:function(a,j,f){var g=this,h=Ext.baseCSSPrefix+&quot;column-header-sort-&quot;,i=h+&quot;ASC&quot;,c=h+&quot;DESC&quot;,b=h+&quot;null&quot;,e=g.getOwnerHeaderCt(),d=g.sortState;if(d!==a&amp;&amp;g.getSortParam()){g.addCls(h+a);if(a&amp;&amp;!f){g.doSort(a)}switch(a){case&quot;DESC&quot;:g.removeCls([i,b]);break;case&quot;ASC&quot;:g.removeCls([c,b]);break;case null:g.removeCls([i,c]);break}if(e&amp;&amp;!g.triStateSort&amp;&amp;!j){e.clearOtherSortStates(g)}g.sortState=a;e.fireEvent(&quot;sortchange&quot;,e,g,a)}},hide:function(){var f=this,c,a,d,g,e=0,b=f.getOwnerHeaderCt();f.oldWidth=f.getWidth();if(f.isGroupHeader){c=f.items.items;f.callParent(arguments);b.onHeaderHide(f);for(d=0,a=c.length;d&lt;a;d++){c[d].hidden=true;b.onHeaderHide(c[d],true)}return}g=f.ownerCt.componentLayout.layoutBusy;f.ownerCt.componentLayout.layoutBusy=true;f.callParent(arguments);f.ownerCt.componentLayout.layoutBusy=g;b.onHeaderHide(f);if(f.ownerCt.isGroupHeader){c=f.ownerCt.query(&quot;&gt;:not([hidden])&quot;);if(!c.length){f.ownerCt.hide()}else{for(d=0,a=c.length;d&lt;a;d++){e+=c[d].getWidth()}f.ownerCt.minWidth=e;f.ownerCt.setWidth(e)}}},show:function(){var k=this,b=k.ownerCt,f=b.componentLayout,c=f.layoutBusy,a=b.layout,g=a.layoutBusy,j,h,e,l,d=0;f.layoutBusy=a.layoutBusy=true;k.callParent(arguments);f.layoutBusy=c;a.layoutBusy=g;if(k.isSubHeader){if(!b.isVisible()){b.show()}}if(k.isGroupHeader&amp;&amp;!k.query(&quot;:not([hidden])&quot;).length){j=k.query(&quot;&gt;*&quot;);for(e=0,h=j.length;e&lt;h;e++){l=j[e];l.preventLayout=true;l.show();d+=l.getWidth();delete l.preventLayout}k.setWidth(d)}if(b.isGroupHeader&amp;&amp;k.preventLayout!==true){j=b.query(&quot;&gt;:not([hidden])&quot;);for(e=0,h=j.length;e&lt;h;e++){d+=j[e].getWidth()}b.minWidth=d;b.setWidth(d)}b=k.getOwnerHeaderCt();if(b){b.onHeaderShow(k,k.preventLayout)}},getDesiredWidth:function(){var a=this;if(a.rendered&amp;&amp;a.componentLayout&amp;&amp;a.componentLayout.lastComponentSize){return a.componentLayout.lastComponentSize.width}else{if(a.flex){return a.width}else{return a.width}}},getCellSelector:function(){return&quot;.&quot;+Ext.baseCSSPrefix+&quot;grid-cell-&quot;+this.getItemId()},getCellInnerSelector:function(){return this.getCellSelector()+&quot; .&quot;+Ext.baseCSSPrefix+&quot;grid-cell-inner&quot;},isOnLeftEdge:function(a){return(a.getXY()[0]-this.el.getLeft()&lt;=this.handleWidth)},isOnRightEdge:function(a){return(this.el.getRight()-a.getXY()[0]&lt;=this.handleWidth)}});Ext.define(&quot;Ext.grid.plugin.HeaderResizer&quot;,{extend:&quot;Ext.util.Observable&quot;,requires:[&quot;Ext.dd.DragTracker&quot;,&quot;Ext.util.Region&quot;],alias:&quot;plugin.gridheaderresizer&quot;,disabled:false,configs:{dynamic:true},colHeaderCls:Ext.baseCSSPrefix+&quot;column-header&quot;,minColWidth:40,maxColWidth:1000,wResizeCursor:&quot;col-resize&quot;,eResizeCursor:&quot;col-resize&quot;,init:function(a){this.headerCt=a;a.on(&quot;render&quot;,this.afterHeaderRender,this,{single:true})},destroy:function(){if(this.tracker){this.tracker.destroy()}},afterHeaderRender:function(){var b=this.headerCt,a=b.el;b.mon(a,&quot;mousemove&quot;,this.onHeaderCtMouseMove,this);this.tracker=Ext.create(&quot;Ext.dd.DragTracker&quot;,{disabled:this.disabled,onBeforeStart:Ext.Function.bind(this.onBeforeStart,this),onStart:Ext.Function.bind(this.onStart,this),onDrag:Ext.Function.bind(this.onDrag,this),onEnd:Ext.Function.bind(this.onEnd,this),tolerance:3,autoStart:300,el:a})},onHeaderCtMouseMove:function(c,a){if(this.headerCt.dragging){if(this.activeHd){this.activeHd.el.dom.style.cursor=&quot;&quot;;delete this.activeHd}}else{var f=c.getTarget(&quot;.&quot;+this.colHeaderCls,3,true),b,d;if(f){b=Ext.getCmp(f.id);if(b.isOnLeftEdge(c)){d=b.previousNode(&quot;gridcolumn:not([hidden])&quot;)}else{if(b.isOnRightEdge(c)){d=b}else{d=null}}if(d){if(d.isGroupHeader){d=d.down(&quot;:not([isGroupHeader]):not([hidden]):last&quot;)}if(d&amp;&amp;!(d.fixed||(d.resizable===false)||this.disabled)){this.activeHd=d;b.el.dom.style.cursor=this.eResizeCursor}}else{b.el.dom.style.cursor=&quot;&quot;;delete this.activeHd}}}},onBeforeStart:function(b){var a=b.getTarget();this.dragHd=this.activeHd;if(!!this.dragHd&amp;&amp;!Ext.fly(a).hasCls(&quot;x-column-header-trigger&quot;)&amp;&amp;!this.headerCt.dragging){this.tracker.constrainTo=this.getConstrainRegion();return true}else{this.headerCt.dragging=false;return false}},getConstrainRegion:function(){var a=this.dragHd.el,b=Ext.util.Region.getRegion(a);return b.adjust(0,this.maxColWidth-a.getWidth(),0,this.minColWidth)},onStart:function(s){var u=this,g=u.dragHd,b=g.el,n=b.getWidth(),i=u.headerCt,k=s.getTarget();if(u.dragHd&amp;&amp;!Ext.fly(k).hasCls(&quot;x-column-header-trigger&quot;)){i.dragging=true}u.origWidth=n;if(!u.dynamic){var d=b.getXY(),q=i.up(&quot;[scrollerOwner]&quot;),f=u.dragHd.up(&quot;:not([isGroupHeader])&quot;),j=f.up(),c=q.getLhsMarker(),m=q.getRhsMarker(),a=m.parent(),h=a.getLeft(true),r=a.getTop(true),p=a.translatePoints(d),o=j.body.getHeight()+i.getHeight(),l=p.top-r;c.setTop(l);m.setTop(l);c.setHeight(o);m.setHeight(o);c.setLeft(p.left-h);m.setLeft(p.left+n-h)}},onDrag:function(g){if(!this.dynamic){var f=this.tracker.getXY(&quot;point&quot;),a=this.headerCt.up(&quot;[scrollerOwner]&quot;),h=a.getRhsMarker(),c=h.parent(),b=c.translatePoints(f),d=c.getLeft(true);h.setLeft(b.left-d)}else{this.doResize()}},onEnd:function(g){this.headerCt.dragging=false;if(this.dragHd){if(!this.dynamic){var f=this.dragHd,c=this.headerCt.up(&quot;[scrollerOwner]&quot;),d=c.getLhsMarker(),i=c.getRhsMarker(),a=f.getWidth(),h=this.tracker.getOffset(&quot;point&quot;),b=-9999;d.setLeft(b);i.setLeft(b)}this.doResize()}},doResize:function(){if(this.dragHd){var b=this.dragHd,a,c=this.tracker.getOffset(&quot;point&quot;);if(b.flex){delete b.flex}this.headerCt.suspendLayout=true;b.setWidth(this.origWidth+c[0],false);if(this.headerCt.forceFit){a=b.nextNode(&quot;gridcolumn:not([hidden]):not([isGroupHeader])&quot;);if(a){delete a.flex;a.setWidth(a.getWidth()-c[0],false)}}this.headerCt.suspendLayout=false;this.headerCt.doComponentLayout(this.headerCt.getFullWidth())}},disable:function(){this.disabled=true;if(this.tracker){this.tracker.disable()}},enable:function(){this.disabled=false;if(this.tracker){this.tracker.enable()}}});Ext.define(&quot;Ext.dd.DragZone&quot;,{extend:&quot;Ext.dd.DragSource&quot;,constructor:function(b,a){this.callParent([b,a]);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}},getDragData:function(a){return Ext.dd.Registry.getHandleFromEvent(a)},onInitDrag:function(a,b){this.proxy.update(this.dragData.ddel.cloneNode(true));this.onStartDrag(a,b);return true},afterRepair:function(){var a=this;if(Ext.enableFx){Ext.fly(a.dragData.ddel).highlight(a.repairHighlightColor)}a.dragging=false},getRepairXY:function(a){return Ext.Element.fly(this.dragData.ddel).getXY()},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define(&quot;Ext.dd.Registry&quot;,{singleton:true,constructor:function(){this.elements={};this.handles={};this.autoIdSeed=0},getId:function(b,a){if(typeof b==&quot;string&quot;){return b}var c=b.id;if(!c&amp;&amp;a!==false){c=&quot;extdd-&quot;+(++this.autoIdSeed);b.id=c}return c},register:function(d,e){e=e||{};if(typeof d==&quot;string&quot;){d=document.getElementById(d)}e.ddel=d;this.elements[this.getId(d)]=e;if(e.isHandle!==false){this.handles[e.ddel.id]=e}if(e.handles){var c=e.handles;for(var b=0,a=c.length;b&lt;a;b++){this.handles[this.getId(c[b])]=e}}},unregister:function(d){var f=this.getId(d,false);var e=this.elements[f];if(e){delete this.elements[f];if(e.handles){var c=e.handles;for(var b=0,a=c.length;b&lt;a;b++){delete this.handles[this.getId(c[b],false)]}}}},getHandle:function(a){if(typeof a!=&quot;string&quot;){a=a.id}return this.handles[a]},getHandleFromEvent:function(b){var a=b.getTarget();return a?this.handles[a.id]:null},getTarget:function(a){if(typeof a!=&quot;string&quot;){a=a.id}return this.elements[a]},getTargetFromEvent:function(b){var a=b.getTarget();return a?this.elements[a.id]||this.handles[a.id]:null}});Ext.define(&quot;Ext.dd.DDTarget&quot;,{extend:&quot;Ext.dd.DragDrop&quot;,constructor:function(c,a,b){if(c){this.initTarget(c,a,b)}},getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return(&quot;DDTarget &quot;+this.id)}});Ext.define(&quot;Ext.dd.ScrollManager&quot;,{singleton:true,requires:[&quot;Ext.dd.DragDropManager&quot;],constructor:function(){var a=Ext.dd.DragDropManager;a.fireEvents=Ext.Function.createSequence(a.fireEvents,this.onFire,this);a.stopDrag=Ext.Function.createSequence(a.stopDrag,this.onStop,this);this.doScroll=Ext.Function.bind(this.doScroll,this);this.ddmInstance=a;this.els={};this.dragEl=null;this.proc={}},onStop:function(a){var b=Ext.dd.ScrollManager;b.dragEl=null;b.clearProc()},triggerRefresh:function(){if(this.ddmInstance.dragCurrent){this.ddmInstance.refreshCache(this.ddmInstance.dragCurrent.groups)}},doScroll:function(){if(this.ddmInstance.dragCurrent){var a=this.proc,b=a.el,c=a.el.ddScrollConfig,d=c?c.increment:this.increment;if(!this.animate){if(b.scroll(a.dir,d)){this.triggerRefresh()}}else{b.scroll(a.dir,d,true,this.animDuration,this.triggerRefresh)}}},clearProc:function(){var a=this.proc;if(a.id){clearInterval(a.id)}a.id=0;a.el=null;a.dir=&quot;&quot;},startProc:function(b,a){this.clearProc();this.proc.el=b;this.proc.dir=a;var d=b.ddScrollConfig?b.ddScrollConfig.ddGroup:undefined,c=(b.ddScrollConfig&amp;&amp;b.ddScrollConfig.frequency)?b.ddScrollConfig.frequency:this.frequency;if(d===undefined||this.ddmInstance.dragCurrent.ddGroup==d){this.proc.id=setInterval(this.doScroll,c)}},onFire:function(g,j){if(j||!this.ddmInstance.dragCurrent){return}if(!this.dragEl||this.dragEl!=this.ddmInstance.dragCurrent){this.dragEl=this.ddmInstance.dragCurrent;this.refreshCache()}var k=g.getXY(),l=g.getPoint(),h=this.proc,f=this.els;for(var b in f){var d=f[b],a=d._region;var i=d.ddScrollConfig?d.ddScrollConfig:this;if(a&amp;&amp;a.contains(l)&amp;&amp;d.isScrollable()){if(a.bottom-l.y&lt;=i.vthresh){if(h.el!=d){this.startProc(d,&quot;down&quot;)}return}else{if(a.right-l.x&lt;=i.hthresh){if(h.el!=d){this.startProc(d,&quot;left&quot;)}return}else{if(l.y-a.top&lt;=i.vthresh){if(h.el!=d){this.startProc(d,&quot;up&quot;)}return}else{if(l.x-a.left&lt;=i.hthresh){if(h.el!=d){this.startProc(d,&quot;right&quot;)}return}}}}}}this.clearProc()},register:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b&lt;a;b++){this.register(c[b])}}else{c=Ext.get(c);this.els[c.id]=c}},unregister:function(c){if(Ext.isArray(c)){for(var b=0,a=c.length;b&lt;a;b++){this.unregister(c[b])}}else{c=Ext.get(c);delete this.els[c.id]}},vthresh:25,hthresh:25,increment:100,frequency:500,animate:true,animDuration:0.4,ddGroup:undefined,refreshCache:function(){var a=this.els,b;for(b in a){if(typeof a[b]==&quot;object&quot;){a[b]._region=a[b].getRegion()}}}});Ext.define(&quot;Ext.grid.header.DragZone&quot;,{extend:&quot;Ext.dd.DragZone&quot;,colHeaderCls:Ext.baseCSSPrefix+&quot;column-header&quot;,maxProxyWidth:120,constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el]);this.proxy.el.addCls(Ext.baseCSSPrefix+&quot;grid-col-dd&quot;)},getDDGroup:function(){return&quot;header-dd-zone-&quot;+this.headerCt.up(&quot;[scrollerOwner]&quot;).id},getDragData:function(b){var d=b.getTarget(&quot;.&quot;+this.colHeaderCls),a;if(d){a=Ext.getCmp(d.id);if(!this.headerCt.dragging&amp;&amp;a.draggable&amp;&amp;!(a.isOnLeftEdge(b)||a.isOnRightEdge(b))){var c=document.createElement(&quot;div&quot;);c.innerHTML=Ext.getCmp(d.id).text;return{ddel:c,header:a}}}return false},onBeforeDrag:function(){return !(this.headerCt.dragging||this.disabled)},onInitDrag:function(){this.headerCt.dragging=true;this.callParent(arguments)},onDragDrop:function(){this.headerCt.dragging=false;this.callParent(arguments)},afterRepair:function(){this.callParent();this.headerCt.dragging=false},getRepairXY:function(){return this.dragData.header.el.getXY()},disable:function(){this.disabled=true},enable:function(){this.disabled=false}});Ext.define(&quot;Ext.dd.DropTarget&quot;,{extend:&quot;Ext.dd.DDTarget&quot;,requires:[&quot;Ext.dd.ScrollManager&quot;],constructor:function(b,a){this.el=Ext.get(b);Ext.apply(this,a);if(this.containerScroll){Ext.dd.ScrollManager.register(this.el)}this.callParent([this.el.dom,this.ddGroup||this.group,{isTarget:true}])},dropAllowed:Ext.baseCSSPrefix+&quot;dd-drop-ok&quot;,dropNotAllowed:Ext.baseCSSPrefix+&quot;dd-drop-nodrop&quot;,isTarget:true,isNotifyTarget:true,notifyEnter:function(a,c,b){if(this.overClass){this.el.addCls(this.overClass)}return this.dropAllowed},notifyOver:function(a,c,b){return this.dropAllowed},notifyOut:function(a,c,b){if(this.overClass){this.el.removeCls(this.overClass)}},notifyDrop:function(a,c,b){return false},destroy:function(){this.callParent();if(this.containerScroll){Ext.dd.ScrollManager.unregister(this.el)}}});Ext.define(&quot;Ext.dd.DropZone&quot;,{extend:&quot;Ext.dd.DropTarget&quot;,requires:[&quot;Ext.dd.Registry&quot;],getTargetFromEvent:function(a){return Ext.dd.Registry.getTargetFromEvent(a)},onNodeEnter:function(d,a,c,b){},onNodeOver:function(d,a,c,b){return this.dropAllowed},onNodeOut:function(d,a,c,b){},onNodeDrop:function(d,a,c,b){return false},onContainerOver:function(a,c,b){return this.dropNotAllowed},onContainerDrop:function(a,c,b){return false},notifyEnter:function(a,c,b){return this.dropNotAllowed},notifyOver:function(a,c,b){var d=this.getTargetFromEvent(c);if(!d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}return this.onContainerOver(a,c,b)}if(this.lastOverNode!=d){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b)}this.onNodeEnter(d,a,c,b);this.lastOverNode=d}return this.onNodeOver(d,a,c,b)},notifyOut:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}},notifyDrop:function(a,c,b){if(this.lastOverNode){this.onNodeOut(this.lastOverNode,a,c,b);this.lastOverNode=null}var d=this.getTargetFromEvent(c);return d?this.onNodeDrop(d,a,c,b):this.onContainerDrop(a,c,b)},triggerCacheRefresh:function(){Ext.dd.DDM.refreshCache(this.groups)}});Ext.define(&quot;Ext.grid.header.DropZone&quot;,{extend:&quot;Ext.dd.DropZone&quot;,colHeaderCls:Ext.baseCSSPrefix+&quot;column-header&quot;,proxyOffsets:[-4,-9],constructor:function(a){this.headerCt=a;this.ddGroup=this.getDDGroup();this.callParent([a.el])},getDDGroup:function(){return&quot;header-dd-zone-&quot;+this.headerCt.up(&quot;[scrollerOwner]&quot;).id},getTargetFromEvent:function(a){return a.getTarget(&quot;.&quot;+this.colHeaderCls)},getTopIndicator:function(){if(!this.topIndicator){this.topIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:&quot;col-move-top&quot;,html:&quot;&amp;#160;&quot;},true)}return this.topIndicator},getBottomIndicator:function(){if(!this.bottomIndicator){this.bottomIndicator=Ext.DomHelper.append(Ext.getBody(),{cls:&quot;col-move-bottom&quot;,html:&quot;&amp;#160;&quot;},true)}return this.bottomIndicator},getLocation:function(d,b){var a=d.getXY()[0],c=Ext.fly(b).getRegion(),g,f;if((c.right-a)&lt;=(c.right-c.left)/2){g=&quot;after&quot;}else{g=&quot;before&quot;}return{pos:g,header:Ext.getCmp(b.id),node:b}},positionIndicator:function(w,o,u){var a=this.getLocation(u,o),q=a.header,g=a.pos,f=w.nextSibling(&quot;gridcolumn:not([hidden])&quot;),t=w.previousSibling(&quot;gridcolumn:not([hidden])&quot;),d,l,r,s,b,c,k,m,x,v;if(!q.draggable&amp;&amp;q.getIndex()==0){return false}this.lastLocation=a;if((w!==q)&amp;&amp;((g===&quot;before&quot;&amp;&amp;f!==q)||(g===&quot;after&quot;&amp;&amp;t!==q))&amp;&amp;!q.isDescendantOf(w)){var n=Ext.dd.DragDropManager.getRelated(this),j=n.length,p=0,h;for(;p&lt;j;p++){h=n[p];if(h!==this&amp;&amp;h.invalidateDrop){h.invalidateDrop()}}this.valid=true;l=this.getTopIndicator();r=this.getBottomIndicator();if(g===&quot;before&quot;){s=&quot;tl&quot;;b=&quot;bl&quot;}else{s=&quot;tr&quot;;b=&quot;br&quot;}c=q.el.getAnchorXY(s);k=q.el.getAnchorXY(b);m=this.headerCt.el;x=m.getLeft();v=m.getRight();c[0]=Ext.Number.constrain(c[0],x,v);k[0]=Ext.Number.constrain(k[0],x,v);c[0]-=4;c[1]-=9;k[0]-=4;l.setXY(c);r.setXY(k);l.show();r.show()}else{this.invalidateDrop()}},invalidateDrop:function(){this.valid=false;this.hideIndicators()},onNodeOver:function(b,a,d,c){if(c.header.el.dom!==b){this.positionIndicator(c.header,b,d)}return this.valid?this.dropAllowed:this.dropNotAllowed},hideIndicators:function(){this.getTopIndicator().hide();this.getBottomIndicator().hide()},onNodeOut:function(){this.hideIndicators()},onNodeDrop:function(d,k,j,f){if(this.valid){this.invalidateDrop();var h=f.header,g=this.lastLocation,m=h.ownerCt,a=m.items.indexOf(h),i=g.header.ownerCt,n=i.items.indexOf(g.header),c=this.headerCt,l,b;if(g.pos===&quot;after&quot;){n++}if(m!==i&amp;&amp;m.lockableInjected&amp;&amp;i.lockableInjected&amp;&amp;i.lockedCt){b=m.up(&quot;[scrollerOwner]&quot;);b.lock(h,n)}else{if(m!==i&amp;&amp;m.lockableInjected&amp;&amp;i.lockableInjected&amp;&amp;m.lockedCt){b=m.up(&quot;[scrollerOwner]&quot;);b.unlock(h,n)}else{if((m===i)&amp;&amp;(n&gt;m.items.indexOf(h))){n--}if(m!==i){m.suspendLayout=true;m.remove(h,false);m.suspendLayout=false}if(m.isGroupHeader){if(!m.items.getCount()){l=m.ownerCt;l.suspendLayout=true;l.remove(m,false);m.el.dom.parentNode.removeChild(m.el.dom);l.suspendLayout=false}else{m.minWidth=m.getWidth()-h.getWidth();m.setWidth(m.minWidth)}}i.suspendLayout=true;if(m===i){i.move(a,n)}else{i.insert(n,h)}i.suspendLayout=false;if(i.isGroupHeader){h.savedFlex=h.flex;delete h.flex;h.width=h.getWidth();i.minWidth=i.getWidth()+h.getWidth()-(h.savedFlex?1:0);i.setWidth(i.minWidth)}else{if(h.savedFlex){h.flex=h.savedFlex;delete h.width}}c.purgeCache();c.doLayout();c.onHeaderMoved(h,a,n);if(!m.items.getCount()){m.destroy()}}}}}});Ext.define(&quot;Ext.grid.plugin.HeaderReorderer&quot;,{extend:&quot;Ext.util.Observable&quot;,requires:[&quot;Ext.grid.header.DragZone&quot;,&quot;Ext.grid.header.DropZone&quot;],alias:&quot;plugin.gridheaderreorderer&quot;,init:function(a){this.headerCt=a;a.on(&quot;render&quot;,this.onHeaderCtRender,this)},destroy:function(){Ext.destroy(this.dragZone,this.dropZone)},onHeaderCtRender:function(){this.dragZone=Ext.create(&quot;Ext.grid.header.DragZone&quot;,this.headerCt);this.dropZone=Ext.create(&quot;Ext.grid.header.DropZone&quot;,this.headerCt);if(this.disabled){this.dragZone.disable()}},enable:function(){this.disabled=false;if(this.dragZone){this.dragZone.enable()}},disable:function(){this.disabled=true;if(this.dragZone){this.dragZone.disable()}}});
</pre>
</body>
</html>
